<?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/donate_to_signal"
    app:startDestination="@id/giftFlowStartFragment">

    <fragment
        android:id="@+id/giftFlowStartFragment"
        android:name="org.thoughtcrime.securesms.badges.gifts.flow.GiftFlowStartFragment"
        android:label="GiftFlowStartFragment">
        <action
            android:id="@+id/action_giftFlowStartFragment_to_setCurrencyFragment"
            app:destination="@id/setCurrencyFragment">
            <argument
                android:name="isBoost"
                app:argType="boolean" />

            <argument
                android:name="supportedCurrencyCodes"
                app:argType="string[]" />
        </action>
        <action
            android:id="@+id/action_giftFlowStartFragment_to_giftFlowRecipientSelectionFragment"
            app:destination="@id/giftFlowRecipientSelectionFragment"
            app:enterAnim="@anim/fragment_open_enter"
            app:exitAnim="@anim/fragment_open_exit"
            app:popEnterAnim="@anim/fragment_close_enter"
            app:popExitAnim="@anim/fragment_close_exit" />
    </fragment>

    <dialog
        android:id="@+id/setCurrencyFragment"
        android:name="org.thoughtcrime.securesms.components.settings.app.subscription.currency.SetCurrencyFragment"
        android:label="SetCurrencyFragment" />

    <fragment
        android:id="@+id/giftFlowRecipientSelectionFragment"
        android:name="org.thoughtcrime.securesms.badges.gifts.flow.GiftFlowRecipientSelectionFragment"
        android:label="GiftFlowRecipientSelectionFragment">
        <action
            android:id="@+id/action_giftFlowRecipientSelectionFragment_to_giftFlowConfirmationFragment"
            app:destination="@id/giftFlowConfirmationFragment"
            app:enterAnim="@anim/fragment_open_enter"
            app:exitAnim="@anim/fragment_open_exit"
            app:popEnterAnim="@anim/fragment_close_enter"
            app:popExitAnim="@anim/fragment_close_exit" />
    </fragment>
    <fragment
        android:id="@+id/giftFlowConfirmationFragment"
        android:name="org.thoughtcrime.securesms.badges.gifts.flow.GiftFlowConfirmationFragment"
        android:label="GiftFlowConfirmationFragment" >
        <action
            android:id="@+id/action_giftFlowConfirmationFragment_to_creditCardFragment"
            app:destination="@id/creditCardFragment" />
        <action
            android:id="@+id/action_giftFlowConfirmationFragment_to_stripePaymentInProgressFragment"
            app:destination="@id/stripePaymentInProgressFragment" />
        <action
            android:id="@+id/action_giftFlowConfirmationFragment_to_gatewaySelectorBottomSheet"
            app:destination="@id/gatewaySelectorBottomSheet" />
    </fragment>

    <dialog
        android:id="@+id/gatewaySelectorBottomSheet"
        android:name="org.thoughtcrime.securesms.components.settings.app.subscription.donate.gateway.GatewaySelectorBottomSheet"
        android:label="gateway_selector_bottom_sheet"
        tools:layout="@layout/dsl_settings_bottom_sheet">

        <argument
            android:name="request"
            app:argType="org.thoughtcrime.securesms.components.settings.app.subscription.donate.gateway.GatewayRequest"
            app:nullable="false" />

    </dialog>

    <dialog
        android:id="@+id/stripePaymentInProgressFragment"
        android:name="org.thoughtcrime.securesms.components.settings.app.subscription.donate.stripe.StripePaymentInProgressFragment"
        android:label="stripe_payment_in_progress_fragment"
        tools:layout="@layout/stripe_payment_in_progress_fragment">

        <argument
            android:name="action"
            app:argType="org.thoughtcrime.securesms.components.settings.app.subscription.donate.DonationProcessorAction"
            app:nullable="false" />

        <argument
            android:name="request"
            app:argType="org.thoughtcrime.securesms.components.settings.app.subscription.donate.gateway.GatewayRequest"
            app:nullable="false" />
        <action
            android:id="@+id/action_stripePaymentInProgressFragment_to_stripe3dsDialogFragment"
            app:destination="@id/stripe3dsDialogFragment" />
    </dialog>

    <fragment
        android:id="@+id/creditCardFragment"
        android:name="org.thoughtcrime.securesms.components.settings.app.subscription.donate.card.CreditCardFragment"
        android:label="credit_card_fragment"
        tools:layout="@layout/credit_card_fragment">

        <argument
            android:name="request"
            app:argType="org.thoughtcrime.securesms.components.settings.app.subscription.donate.gateway.GatewayRequest"
            app:nullable="false" />

        <action
            android:id="@+id/action_creditCardFragment_to_yourInformationIsPrivateBottomSheet"
            app:destination="@id/yourInformationIsPrivateBottomSheet" />
    </fragment>

    <dialog
        android:id="@+id/stripe3dsDialogFragment"
        android:name="org.thoughtcrime.securesms.components.settings.app.subscription.donate.stripe.Stripe3DSDialogFragment"
        android:label="stripe_3ds_dialog_fragment"
        tools:layout="@layout/stripe_3ds_dialog_fragment">

        <argument
            android:name="uri"
            app:argType="android.net.Uri"
            app:nullable="false" />

        <argument
            android:name="return_uri"
            app:argType="android.net.Uri"
            app:nullable="false" />
    </dialog>

    <dialog
        android:id="@+id/yourInformationIsPrivateBottomSheet"
        android:name="org.thoughtcrime.securesms.components.settings.app.subscription.donate.card.YourInformationIsPrivateBottomSheet"
        android:label="your_information_is_private_bottom_sheet"
        tools:layout="@layout/dsl_settings_bottom_sheet" />
</navigation>