<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="https://jakarta.ee/xml/ns/jakartaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee 
              https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_4_0.xsd"
              version="4.0">

    <application>
        <message-bundle>messages</message-bundle>
        <locale-config>
            <default-locale>fr</default-locale>
            <supported-locale>fr</supported-locale>
            <supported-locale>en</supported-locale>
        </locale-config>
        
        <!-- Navigation Rules -->
        <navigation-rule>
            <from-view-id>*</from-view-id>
            <navigation-case>
                <from-outcome>dashboard</from-outcome>
                <to-view-id>/pages/dashboard.xhtml</to-view-id>
                <redirect/>
            </navigation-case>
            <navigation-case>
                <from-outcome>profile</from-outcome>
                <to-view-id>/pages/profile.xhtml</to-view-id>
                <redirect/>
            </navigation-case>
            <navigation-case>
                <from-outcome>clients</from-outcome>
                <to-view-id>/pages/clients.xhtml</to-view-id>
                <redirect/>
            </navigation-case>
            <navigation-case>
                <from-outcome>home</from-outcome>
                <to-view-id>/index.xhtml</to-view-id>
                <redirect/>
            </navigation-case>
        </navigation-rule>
    </application>

</faces-config>
