<?php

$firstTimeRentIssues = [
  [
    'issue' => 'They are requesting references, but I’m a first-time renter and don’t have any.',
    'content' => [
      'Don’t worry! There are ways around not having any previous landlord references. Often landlords or apartment community managers will simply require a larger security deposit as an alternative, or perhaps a guarantor to sign the lease as well. Alternative references may also be requested, such as an employer or character reference.'
    ]
  ], [
    'issue' => 'I’ve been asked for a credit report/check, but I don’t have a credit history.',
    'content' => [
      'No credit? Well it’s probably time to start building one! The easiest way to build a positive credit score is to sign up for a credit card from your bank, then make small purchases on it and always pay the balance off on time. If you don’t want a credit card, you can secure a small loan from your bank, then make on-time payments or pay it off right away. Many landlords will require a credit check, so it’s a wise move to be prepared and create a positive credit history beforehand.'
    ]
  ]
];

?>

<article>

  <div class="bg-white">
    <h2 class="text-l p-4 text-red-500 font-bold">Questions to ask the landlords</h2>

    <div class="p-4 bg-cadet-800 text-white">

      <p>Here are a few questions to ask your future landlord about the rental:</p>

      <ul class="list-disc px-4 space-y-2 py-2">
        <li>What is the total square footage and room configuration?</li>
        <li>Are some or all of the utilities covered by the rent? If not, can you give me an estimate for those costs?</li>
        <li>What are your parking options?</li>
        <li>Is there on-site maintenance, security, and/or property managers?</li>
        <li>What is the refund policy for security deposits?</li>
        <li>Is there a secure area for mail and inbound packages?</li>
        <li>What types of customizations can you make to a property (paint, nails for hanging pictures, etc.)? Which ones are prohibited?</li>
        <li>Will facilities staff conduct inspections, and how much notice do they need to give?</li>
        <li>Are there any safety or health concerns associated with the property (mould, lead paint, etc.)?</li>
        <li>When are quiet hours?</li>
        <li>Are there guest restrictions?</li>
        <li>Are there any fees associated with the rental that we haven’t discussed?</li>
      </ul>
    </div>

  </div>

  <div class="p-4">
    <div class="px-4 space-y-2 py-4 bg-cadet-300">
      <p class="font-bold">Walkthrough</p>
      <p class="font-medium">You should always conduct a formal walkthrough with your landlord or property manager before signing a lease.</p>
    </div>
  </div>

  <div class="bg-white">
    <div class="p-4">
      <h2 class="text-l text-red-500 font-bold mb-2">Review the Lease</h2>
      <p>Always read the entire lease agreement. You may notice some restrictions and procedures you were not expecting on how the issues of a lease agreement work. Most lease agreements are detailed to avoid any uncertainties.</p>
    </div>

    <div class="px-4">


      <ul class=" bg-cadet-800 text-white list-disc list-inside p-4 space-y-2">
        <li>What is the total square footage and room configuration?</li>
        <li>What charges are you liable for?</li>
        <li>If you decide to move away during summer break on a one-year lease, are you allowed to sublet your room for those months?</li>
        <li>Are you allowed to add roommates to your lease?</li>
        <li>Pet policies?</li>
      </ul>
    </div>

  </div>

  <div class="p-4 font-medium">
    <p>The Landlord Tennent Act outlines the legal rights and responsibilities of the Landlord and you, the Tenant. You can learn more at: <a class="font-bold underline" href="http://www.ontario.ca/page/renting-ontario-your-rights">Renting in Ontario: Your rights</a></p>
  </div>

  <div class="flex justify-center max-w-xl mx-auto mb-4">
    <img class="w-3/5" src="<?php echo get_template_directory_uri(); ?>/assets/images/bgs/housing-graphics.png" alt="Housing">
  </div>

  <!-- Student Renting Issues -->
  <div class="flex flex-col bg-white mb-4">

    <div class="py-4 bg-green-600 px-6">
      <p class="font-bold text-white">The following are some common problems first-time renters might run into</p>
    </div>

    <!-- Issues Loop -->
    <div class="flex flex-1 flex-col">
      <div class="flex flex-1 flex-col gap-y-7">

        <div>
          <ul role="list" class="text-blue-900">

            <!-- Issues Loop -->
            <?php

            foreach ($firstTimeRentIssues as $issue) {

            ?>

              <li class="accordion issues-columns">
                <div class="flex px-2 rounded-md justify-between">
                  <div href="" class="gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold flex items-center align-middle">
                    <p><?php echo $issue['issue'] ?></p>
                  </div>

                  <button class="accordion-toggle">
                    <i class="fas fa-chevron-down items-center ml-auto rounded-m px-2.5 py-2 " aria-hidden="true"></i>
                    <i class="fas fa-times items-center ml-auto rounded-md px-3 py-2" aria-hidden="true"></i>
                  </button>

                </div>
                <div class="accordion-content space-y-4">

                  <!-- Issue Content  -->
                  <div>
                    <ul class="<?php
                                if (count($issue['content']) > 1) {
                                  echo (count($issue['content']) > 1) ? 'list-disc' : '';
                                } ?>">
                      <?php
                      foreach ($issue['content'] as $info) { ?>
                        <li class="mb-2">
                          <?php echo $info ?>
                        </li>
                      <?php } ?>
                    </ul>
                  </div>
                </div>
              </li>


            <?php } ?>

          </ul>
        </div>

      </div>
    </div>

  </div>

  <div class="px-4">
    <p>
      For more information, please check out the following:
    </p>
    <ul class="p-4 mt-2 bg-cadet-200 space-y-2">
      <li>- <a class="font-medium underline" href="https://www.bestcolleges.com/resources/student-renters-guide/">Student Renters Guide</a></li>
      <li>- <a class="font-medium underline" href="https://www.places4students.com/Blog/BlogView?BlogID=33">Potential Problems For Students As First-Time Renters</a></li>
    </ul>

  </div>

</article>