<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui">

    <!--
        Composant colonne Texte avec icône réutilisable - DRY/WOU
        Usage :
        <ui:include src="/templates/components/columns/column-text-with-icon.xhtml">
            <ui:param name="headerText" value="Localisation"/>
            <ui:param name="icon" value="pi pi-map-marker"/>
            <ui:param name="text" value="#{item.ville}, #{item.region}"/>
            <ui:param name="width" value="200px"/>
        </ui:include>
    -->

    <p:column headerText="#{headerText}" sortBy="#{sortBy}" filterBy="#{filterBy}"
        filterMatchMode="#{empty filterMatchMode ? 'contains' : filterMatchMode}"
        style="#{not empty width ? 'width: ' += width : ''}">
        <ui:fragment rendered="#{not empty icon}">
            <i class="#{icon} mr-1 text-primary"></i>
        </ui:fragment>
        <h:outputText value="#{text}" styleClass="#{not empty styleClass ? styleClass : ''}" />
        <ui:insert />
    </p:column>
</ui:composition>