<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">
    
    <!-- 
        Composant selectCheckboxMenu réutilisable (WOU/DRY)
        Usage: <ui:include src="/templates/components/forms/form-field-checkbox-menu.xhtml">
                  <ui:param name="id" value="searchStatut" />
                  <ui:param name="label" value="Statut" />
                  <ui:param name="value" value="#{bean.filtres.statuts}" />
                  <ui:param name="update" value=":formResultats:dtResultats @(.search-summary)" />
                  <ui:define name="items">
                      <f:selectItem itemLabel="Actif" itemValue="ACTIF" />
                      <f:selectItem itemLabel="Inactif" itemValue="INACTIF" />
                  </ui:define>
                </ui:include>
    -->
    
    <div class="field">
        <p:outputLabel for="#{id}" value="#{label}" />
        <p:selectCheckboxMenu id="#{id}" 
                              value="#{value}" 
                              multiple="true"
                              styleClass="w-full">
            <ui:insert name="items" />
            <p:ajax update="#{not empty update ? update : ':formResultats:dtResultats @(.search-summary)'}" />
        </p:selectCheckboxMenu>
    </div>
</ui:composition>

