<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 bouton secondaire réutilisable (WOU/DRY)
        Usage: <ui:include src="/templates/components/buttons/button-secondary.xhtml">
                  <ui:param name="value" value="Texte du bouton" />
                  <ui:param name="icon" value="pi pi-icon-name" />
                  <ui:param name="action" value="#{bean.method}" />
                  <ui:param name="outcome" value="/page" />
                  <ui:param name="update" value="componentId" />
                  <ui:param name="onclick" value="javascript" />
                  <ui:param name="disabled" value="false" />
                  <ui:param name="outlined" value="true" />
                  <ui:param name="styleClass" value="" />
                </ui:include>
    -->
    
    <ui:fragment rendered="#{empty rendered or rendered}">
        <ui:fragment rendered="#{empty outcome}">
            <p:commandButton 
                value="#{value}"
                icon="#{icon}"
                action="#{action}"
                update="#{update}"
                onclick="#{onclick}"
                disabled="#{not empty disabled and disabled}"
                styleClass="ui-button-secondary #{not empty outlined and outlined ? 'ui-button-outlined' : ''} #{not empty styleClass ? styleClass : ''}"
                title="#{title}" />
        </ui:fragment>
        <ui:fragment rendered="#{not empty outcome}">
            <p:button 
                value="#{value}"
                icon="#{icon}"
                outcome="#{outcome}"
                styleClass="ui-button-secondary #{not empty outlined and outlined ? 'ui-button-outlined' : ''} #{not empty styleClass ? styleClass : ''}"
                title="#{title}" />
        </ui:fragment>
    </ui:fragment>
</ui:composition>

