<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (c) 2022 Proton AG
  ~
  ~ This file is part of Proton Mail.
  ~
  ~ Proton Mail is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Proton Mail is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with Proton Mail. If not, see https://www.gnu.org/licenses/.
  -->

<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/background_norm"
    android:clickable="true"
    android:paddingTop="@dimen/padding_l"
    android:focusable="true">

    <ImageView
        android:id="@+id/info_icon"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:padding="@dimen/padding_l"
        app:srcCompat="@drawable/ic_proton_info_circle"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:tint="@color/icon_hint"
        tools:ignore="ContentDescription" />

    <TextView
        android:id="@+id/info_text_view"
        style="@style/Proton.Text.Caption.Hint"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:paddingTop="@dimen/padding_l"
        android:paddingEnd="@dimen/padding_l"
        android:paddingBottom="@dimen/padding_l"
        android:text="@string/settings_swipe_settings_info"
        app:layout_constraintBottom_toBottomOf="@id/info_icon"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/info_icon"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/left_to_right_text_view"
        style="@style/Proton.Text.DefaultSmall"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:padding="@dimen/padding_l"
        android:text="@string/settings_swipe_left_to_right"
        app:layout_constraintBottom_toBottomOf="@id/left_to_right_swipe_action_text_view"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/info_icon" />

    <TextView
        android:id="@+id/left_to_right_swipe_action_text_view"
        style="@style/Proton.Text.DefaultSmall.Weak"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:drawablePadding="@dimen/padding_m"
        android:gravity="end|center_vertical"
        android:padding="@dimen/padding_l"
        android:textAlignment="gravity"
        app:drawableEndCompat="@drawable/ic_proton_chevron_right"
        app:drawableTint="@color/icon_hint"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/left_to_right_text_view"
        app:layout_constraintTop_toBottomOf="@id/info_icon" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/left_to_right_preview"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/padding_3xl"
        android:background="@color/background_secondary"
        android:orientation="horizontal"
        android:paddingStart="@dimen/padding_xl"
        android:paddingTop="@dimen/padding_xl"
        android:paddingBottom="@dimen/padding_xl"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/left_to_right_swipe_action_text_view">

        <LinearLayout
            android:id="@+id/left_to_right_placeholder_wrapper"
            android:layout_width="@dimen/settings_swipe_placeholder_width"
            android:layout_height="@dimen/settings_swipe_placeholder_height"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <ViewStub
                android:id="@+id/left_to_right_placeholder"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/left_to_right_image"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@color/background_norm"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toEndOf="@id/left_to_right_placeholder_wrapper"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent">
            <include layout="@layout/settings_right_swipe_action_preview" />
        </LinearLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>

    <View
        android:id="@+id/divider"
        android:layout_width="match_parent"
        android:layout_height="@dimen/padding_4xl"
        app:layout_constraintTop_toBottomOf="@id/left_to_right_preview" />

    <View
        style="@style/ViewSeparatorHorizontal"
        android:layout_width="match_parent"
        app:layout_constraintTop_toBottomOf="@id/divider" />


    <TextView
        android:id="@+id/right_to_left_text_view"
        style="@style/Proton.Text.DefaultSmall"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:padding="@dimen/padding_l"
        android:text="@string/settings_swipe_right_to_left"
        app:layout_constraintBottom_toBottomOf="@id/right_to_left_swipe_action_text_view"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/divider" />

    <TextView
        android:id="@+id/right_to_left_swipe_action_text_view"
        style="@style/Proton.Text.DefaultSmall.Weak"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:drawablePadding="@dimen/padding_m"
        android:gravity="end|center_vertical"
        android:padding="@dimen/padding_l"
        android:textAlignment="gravity"
        app:drawableEndCompat="@drawable/ic_proton_chevron_right"
        app:drawableTint="@color/icon_hint"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/right_to_left_text_view"
        app:layout_constraintTop_toBottomOf="@id/divider" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/right_to_left_preview"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/padding_3xl"
        android:background="@color/background_secondary"
        android:orientation="horizontal"
        android:paddingTop="@dimen/padding_xl"
        android:paddingEnd="@dimen/padding_xl"
        android:paddingBottom="@dimen/padding_xl"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/right_to_left_swipe_action_text_view">

        <LinearLayout
            android:id="@+id/right_to_left_placeholder_wrapper"
            android:layout_width="@dimen/settings_swipe_placeholder_width"
            android:layout_height="@dimen/settings_swipe_placeholder_height"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <ViewStub
                android:id="@+id/right_to_left_placeholder"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/right_to_left_image"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@color/background_norm"
            android:gravity="center"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/right_to_left_placeholder_wrapper"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <include layout="@layout/settings_left_swipe_action_preview" />
        </LinearLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>