<?php
/**
 * Template part for displaying the sidebar on the left side of the page
 *
 * @package MarComm-AUX
 * @since 1.0.0
 */
use WP_AUX\Entities\PageTemplateEntity;

$auxTemplate = PageTemplateEntity::getRequested();
?>
<nav class="sidebar show-for-medium" aria-label="Sidebar navigation">
  <?php
  echo $auxTemplate->sidebar->parentLink();
  echo $auxTemplate->sidebar->navMenu(true);
  ?>
</nav>

<nav class="sidebar hide-for-medium" aria-label="Navigate to each section">
  <div class="aux-accordion" id="accordionItem-side">
    <span id="accordionID-side">
      <button
        aria-controls="aside"
        aria-expanded="false"
        aria-label="On This Page navigation"
        class="aux-accordion-trigger"
      >
        <span class="aux-accordion__title">
          <p>Sidebar Menu</p>
        </span>
      </button>
    </span>
    <div
      aria-labelledby="accordionID-side aside"
      class="aux-accordion-panel"
      hidden=""
      id="aside"
      role="region"
    >
      <?php
      echo $auxTemplate->sidebar->parentLink();
      echo $auxTemplate->sidebar->navMenu(false);
      ?>
    </div>
  </div>
</nav>
