{{!
    @template local_kid/nav_sidebar

    * promotionlabel - string, optional
    * switcher - optional { options: [{id, name, selected}], action, returnurl, sesskey } —
      sélecteur A, the plugin-wide "promotion affichée" switcher; null when
      the user can't switch or there's nothing to switch between yet
    * items - array of { label, url, isactive, icon } (icon = DSFR fr-icon-* class)
}}
<aside class="kid-sidebar">
    <div class="kid-sidebar__header">
        <p class="kid-sidebar__title">Évaluation INSP</p>
        {{#promotionlabel}}<p class="kid-sidebar__sub">{{promotionlabel}}</p>{{/promotionlabel}}
    </div>
    {{#switcher}}
    <form class="kid-sidebar__promotion-switch" method="post" action="{{action}}">
        <label class="kid-sidebar__promotion-label" for="kid-promotion-switch-select">{{#str}}promotion_switch, local_kid{{/str}}</label>
        <input type="hidden" name="sesskey" value="{{sesskey}}">
        <input type="hidden" name="returnurl" value="{{returnurl}}">
        <select name="promotionid" id="kid-promotion-switch-select" class="kid-sidebar__promotion-select" onchange="this.form.submit()">
            {{#options}}
            <option value="{{id}}" {{#selected}}selected{{/selected}}>{{name}}</option>
            {{/options}}
        </select>
        <noscript><button type="submit">{{#str}}promotion_switch_go, local_kid{{/str}}</button></noscript>
    </form>
    {{/switcher}}
    <nav class="kid-sidebar__nav">
        {{#items}}
        <a href="{{url}}" class="kid-sidebar__link {{icon}} {{#isactive}}is-active{{/isactive}}" data-kid-guard-nav="1">{{label}}</a>
        {{/items}}
    </nav>
</aside>
