<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright 2019, The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!-- Note that the animations may show red in Android Studio;
     however, they are present and working perfectly fine. -->

<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/navigation"
    app:startDestination="@id/sleep_tracker_fragment">

    <fragment
        android:id="@+id/sleep_tracker_fragment"
        android:name="com.example.android.trackmysleepquality.sleeptracker.SleepTrackerFragment"
        android:label="@string/sleep_tracker_fragment"
        tools:layout="@layout/fragment_sleep_tracker">
        <action
            android:id="@+id/action_sleepTrackerFragment_to_sleepQualityFragment"
            app:destination="@id/sleep_quality_fragment"
            app:enterAnim="@anim/slide_in_right"
            app:popEnterAnim="@anim/slide_in_right" />
        <action
            android:id="@+id/action_sleep_tracker_fragment_to_sleepDetailFragment"
            app:destination="@id/sleep_detail_fragment"
            app:enterAnim="@anim/slide_in_right"
            app:popEnterAnim="@anim/slide_in_right" />
    </fragment>

    <fragment
        android:id="@+id/sleep_quality_fragment"
        android:name="com.example.android.trackmysleepquality.sleepquality.SleepQualityFragment"
        android:label="@string/sleep_quality_fragment"
        tools:layout="@layout/fragment_sleep_quality">
        <argument
            android:name="sleepNightKey"
            app:argType="long" />
        <action
            android:id="@+id/action_sleepQualityFragment_to_sleepTrackerFragment"
            app:destination="@id/sleep_tracker_fragment"
            app:launchSingleTop="false"
            app:popUpTo="@+id/sleep_tracker_fragment"
            app:popUpToInclusive="true" />
    </fragment>

    <fragment
        android:id="@+id/sleep_detail_fragment"
        android:name="com.example.android.trackmysleepquality.sleepdetail.SleepDetailFragment"
        android:label="fragment_sleep_detail"
        tools:layout="@layout/fragment_sleep_detail" >
        <argument
            android:name="sleepNightKey"
            app:argType="long" />
        <action
            android:id="@+id/action_sleepDetailFragment_to_sleep_tracker_fragment"
            app:destination="@id/sleep_tracker_fragment"
            app:launchSingleTop="false"
            app:popUpTo="@+id/sleep_tracker_fragment"
            app:popUpToInclusive="true" />
    </fragment>

</navigation>
