<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 champ numérique réutilisable (WOU/DRY)
        Usage: <ui:include src="/templates/components/forms/form-field-number.xhtml">
                  <ui:param name="id" value="ageMin" />
                  <ui:param name="label" value="Âge minimum" />
                  <ui:param name="value" value="#{bean.filtres.ageMin}" />
                  <ui:param name="placeholder" value="Ex: 25" />
                  <ui:param name="minValue" value="0" />
                  <ui:param name="maxValue" value="100" />
                  <ui:param name="update" value=":formResultats:dtResultats @(.search-summary)" />
                </ui:include>
    -->
    
    <div class="field">
        <p:outputLabel for="#{id}" value="#{label}" />
        <p:inputNumber id="#{id}"
                      value="#{value}"
                      symbol="#{not empty symbol ? symbol : ''}"
                      placeholder="#{not empty placeholder ? placeholder : ''}"
                      minValue="#{not empty minValue ? minValue : '-999999999999'}"
                      maxValue="#{not empty maxValue ? maxValue : '999999999999'}"
                      styleClass="w-full">
            <p:ajax event="change"
                   update="#{not empty update ? update : '@none'}" />
        </p:inputNumber>
    </div>
</ui:composition>

