<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/nav_graph.xml"
    app:startDestination="@id/splashFragment">

    <fragment
        android:id="@+id/splashFragment"
        android:name="com.mrozon.feature_splash.presentation.SplashFragment"
        android:label="SplashFragment"
        tools:layout="@layout/fragment_splash" >
        <action
            android:id="@+id/action_splashFragment_to_loginFragment"
            app:destination="@id/loginFragment"
            app:enterAnim="@anim/slide_in_right"
            app:exitAnim="@anim/slide_out_left"
            app:popEnterAnim="@anim/slide_in_left"
            app:popExitAnim="@anim/slide_out_right"/>
        <action
            android:id="@+id/action_splashFragment_to_listPersonFragment"
            app:destination="@id/listPersonFragment"
            app:enterAnim="@anim/slide_in_right"
            app:exitAnim="@anim/slide_out_left"
            app:launchSingleTop="true"
            app:popEnterAnim="@anim/slide_in_left"
            app:popExitAnim="@anim/slide_out_right"
            app:popUpTo="@id/listPersonFragment"
            app:popUpToInclusive="true" />
    </fragment>

    <fragment
        android:id="@+id/loginFragment"
        android:name="com.mrozon.feature_auth.presentation.LoginFragment"
        tools:layout="@layout/fragment_login"
        android:label="LoginFragment" >
        <action
            android:id="@+id/action_loginFragment_to_registrationFragment"
            app:destination="@id/registrationFragment"
            app:enterAnim="@anim/slide_in_right"
            app:exitAnim="@anim/slide_out_left"
            app:popEnterAnim="@anim/slide_in_left"
            app:popExitAnim="@anim/slide_out_right"/>
        <action
            android:id="@+id/action_loginFragment_to_listPersonFragment"
            app:destination="@id/listPersonFragment"
            app:enterAnim="@anim/slide_in_right"
            app:exitAnim="@anim/slide_out_left"
            app:popEnterAnim="@anim/slide_in_left"
            app:popExitAnim="@anim/slide_out_right"
            app:popUpTo="@id/listPersonFragment"
            app:popUpToInclusive="true" />
    </fragment>

    <fragment
        android:id="@+id/registrationFragment"
        tools:layout="@layout/fragment_registration"
        android:name="com.mrozon.feature_auth.presentation.RegistrationFragment"
        android:label="RegistrationFragment" >
        <action
            android:id="@+id/action_registrationFragment_to_loginFragment"
            app:destination="@id/loginFragment"
            app:enterAnim="@anim/slide_in_right"
            app:exitAnim="@anim/slide_out_left"
            app:popEnterAnim="@anim/slide_in_left"
            app:popExitAnim="@anim/slide_out_right"
            app:popUpTo="@id/loginFragment"
            app:popUpToInclusive="true" />
    </fragment>

    <action
        android:id="@+id/action_global_loginFragment"
        app:destination="@id/loginFragment"
        app:enterAnim="@anim/slide_in_right"
        app:exitAnim="@anim/slide_out_left"
        app:popEnterAnim="@anim/slide_in_left"
        app:popExitAnim="@anim/slide_out_right"
        app:popUpTo="@id/loginFragment"
        app:popUpToInclusive="true" />

    <fragment
        android:id="@+id/listPersonFragment"
        android:name="com.mrozon.feature_person.presentation.ListPersonFragment"
        android:label="@string/list_persons"
        tools:layout="@layout/fragment_list_person">
        <action
            android:id="@+id/action_listPersonFragment_to_editPersonFragment"
            app:destination="@id/editPersonFragment"
            app:enterAnim="@anim/slide_in_right"
            app:exitAnim="@anim/slide_out_left"
            app:popEnterAnim="@anim/slide_in_left"
            app:popExitAnim="@anim/slide_out_right"/>
        <action
            android:id="@+id/action_listPersonFragment_to_tabMeasureFragment"
            app:destination="@id/tabMeasureFragment"
            app:enterAnim="@anim/slide_in_right"
            app:exitAnim="@anim/slide_out_left"
            app:popEnterAnim="@anim/slide_in_left"
            app:popExitAnim="@anim/slide_out_right"/>
    </fragment>

    <fragment
        android:id="@+id/editPersonFragment"
        android:name="com.mrozon.feature_person.presentation.EditPersonFragment"
        tools:layout="@layout/fragment_edit_person"
        android:label="{title}" >
        <argument
            android:name="title"
            app:argType="string" />
        <argument
            android:name="id"
            app:argType="long" />
        <action
            android:id="@+id/action_editPersonFragment_to_listPersonFragment"
            app:destination="@id/listPersonFragment" />
    </fragment>

    <action android:id="@+id/action_global_listPersonFragment"
        app:destination="@id/listPersonFragment"
        app:enterAnim="@anim/slide_in_right"
        app:exitAnim="@anim/slide_out_left"
        app:popEnterAnim="@anim/slide_in_left"
        app:popExitAnim="@anim/slide_out_right"/>

    <fragment
        android:id="@+id/listMeasureTypeFragment"
        android:name="com.mrozon.feature_measure_type.presentation.ListMeasureTypeFragment"
        tools:layout="@layout/fragment_list_measure_type"
        android:label="@string/list_measure_types" />

    <action android:id="@+id/action_global_listMeasureTypeFragment"
        app:destination="@id/listMeasureTypeFragment"
        app:enterAnim="@anim/slide_in_right"
        app:exitAnim="@anim/slide_out_left"
        app:popEnterAnim="@anim/slide_in_left"
        app:popExitAnim="@anim/slide_out_right"/>

    <fragment
        android:id="@+id/tabMeasureFragment"
        android:name="com.mrozon.feature_measure.presentation.TabMeasureFragment"
        tools:layout="@layout/fragment_tab_measure"
        android:label="TabMeasureFragment" >
        <action
            android:id="@+id/action_tabMeasureFragment_to_editMeasureFragment"
            app:destination="@id/editMeasureFragment"
            app:enterAnim="@anim/slide_in_right"
            app:exitAnim="@anim/slide_out_left"
            app:popEnterAnim="@anim/slide_in_left"
            app:popExitAnim="@anim/slide_out_right"/>
    </fragment>

    <fragment
        android:id="@+id/listMeasureFragment"
        android:name="com.mrozon.feature_measure.presentation.ListMeasureFragment"
        tools:layout="@layout/fragment_list_measure"
        android:label="ListMeasureFragment" />

    <fragment
        android:id="@+id/editMeasureFragment"
        android:name="com.mrozon.feature_measure.presentation.EditMeasureFragment"
        tools:layout="@layout/fragment_edit_measure"
        android:label="{title}" >
        <argument
            android:name="title"
            app:argType="string" />
        <argument
            android:name="id"
            app:argType="long" />
        <argument
            android:name="personId"
            app:argType="long" />
        <argument
            android:name="measureTypeId"
            app:argType="long" />
        <action
            android:id="@+id/action_editMeasureFragment_to_listMeasureFragment"
            app:destination="@id/tabMeasureFragment"
            app:enterAnim="@anim/slide_in_right"
            app:exitAnim="@anim/slide_out_left"
            app:launchSingleTop="true"
            app:popEnterAnim="@anim/slide_in_left"
            app:popExitAnim="@anim/slide_out_right"
            app:popUpToInclusive="true" />
    </fragment>

</navigation>