{{!
    @template local_kid/item_picker

    Landing screen shared by the Évaluations/Stages/CAPP main-menu entries:
    a simple "pick which active item to fill in" list, deliberately without
    any of the referentiel CRUD actions (add/edit/toggle) that belong only
    to the corresponding Administration tab.

    * introlabel - string
    * hasitems - bool
    * items - array of { titre, meta, openurl, exporturl }
      (exporturl optionnel — actuellement seul le picker CAPP le fournit,
      lien vers le livret PDF de la session, pages/capp_rapport.php)
    * emptymessage - string
}}
<div class="kid-card" style="margin-bottom:1rem;">
    <p class="kid-muted">{{introlabel}}</p>
</div>

{{^hasitems}}
    {{> local_kid/empty_state}}
{{/hasitems}}

{{#hasitems}}
<div class="kid-table-wrap">
    <table class="kid-table">
        <tbody>
            {{#items}}
            <tr>
                <td><a class="fr-link" href="{{openurl}}">{{titre}}</a></td>
                <td class="kid-muted">{{meta}}</td>
                <td>{{#exporturl}}<a class="fr-link" href="{{exporturl}}">{{#str}}capp_rapport_action, local_kid{{/str}}</a>{{/exporturl}}</td>
            </tr>
            {{/items}}
        </tbody>
    </table>
</div>
{{/hasitems}}
