<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:viewBindingIgnore="true"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <ScrollView
        android:id="@+id/help_fragment_scroller"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:fadingEdge="vertical"
        android:fillViewport="true"
        android:requiresFadingEdge="vertical"
        app:layout_constraintBottom_toTopOf="@id/help_fragment_faq"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:navigationIcon="@drawable/symbol_arrow_start_24"
                app:title="@string/preferences__help" />

            <TextView
                android:id="@+id/help_fragment_contact"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="16dp"
                android:text="@string/HelpFragment__contact_us"
                android:textAppearance="@style/TextAppearance.AppCompat.Body2"
                android:textColor="?attr/signal_text_secondary"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/toolbar" />

            <EditText
                android:id="@+id/help_fragment_problem"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="12dp"
                android:layout_marginEnd="16dp"
                android:background="@drawable/help_fragment_problem_background"
                android:gravity="top"
                android:hint="@string/HelpFragment__tell_us_whats_going_on"
                android:inputType="textMultiLine"
                android:minHeight="144dp"
                android:padding="16dp"
                android:textSize="16sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/help_fragment_contact" />

            <TextView
                android:id="@+id/help_fragment_category_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="16dp"
                android:layout_marginEnd="16dp"
                android:text="@string/HelpFragment__tell_us_why_youre_reaching_out"
                android:textAppearance="@style/TextAppearance.AppCompat.Body2"
                android:textColor="?attr/signal_text_secondary"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/help_fragment_problem" />

            <Spinner
                android:id="@+id/help_fragment_category"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="16dp"
                app:layout_constraintTop_toBottomOf="@id/help_fragment_category_title"
                app:layout_constraintStart_toStartOf="parent"/>

            <TextView
                android:id="@+id/help_fragment_feelings"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="16dp"
                android:layout_marginEnd="16dp"
                android:text="@string/HelpFragment__how_do_you_feel"
                android:textAppearance="@style/TextAppearance.AppCompat.Body2"
                android:textColor="?attr/signal_text_secondary"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/help_fragment_category" />

            <org.thoughtcrime.securesms.components.emoji.EmojiImageView
                android:id="@+id/help_fragment_emoji_5"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_marginStart="16dp"
                android:layout_marginTop="12dp"
                android:layout_marginEnd="8dp"
                android:background="@drawable/help_fragment_emoji_radio_background"
                android:button="@null"
                android:gravity="center"
                android:padding="4dp"
                android:scaleType="fitCenter"
                app:layout_constraintEnd_toStartOf="@id/help_fragment_emoji_4"
                app:layout_constraintHorizontal_bias="0"
                app:layout_constraintHorizontal_chainStyle="packed"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/help_fragment_feelings" />

            <org.thoughtcrime.securesms.components.emoji.EmojiImageView
                android:id="@+id/help_fragment_emoji_4"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_marginEnd="8dp"
                android:background="@drawable/help_fragment_emoji_radio_background"
                android:button="@null"
                android:gravity="center"
                android:scaleType="fitCenter"
                android:padding="4dp"
                app:layout_constraintBottom_toBottomOf="@id/help_fragment_emoji_5"
                app:layout_constraintEnd_toStartOf="@id/help_fragment_emoji_3"
                app:layout_constraintStart_toEndOf="@id/help_fragment_emoji_5"
                app:layout_constraintTop_toTopOf="@id/help_fragment_emoji_5" />

            <org.thoughtcrime.securesms.components.emoji.EmojiImageView
                android:id="@+id/help_fragment_emoji_3"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_marginEnd="8dp"
                android:background="@drawable/help_fragment_emoji_radio_background"
                android:button="@null"
                android:gravity="center"
                android:scaleType="fitCenter"
                android:padding="4dp"
                app:layout_constraintBottom_toBottomOf="@id/help_fragment_emoji_4"
                app:layout_constraintEnd_toStartOf="@id/help_fragment_emoji_2"
                app:layout_constraintStart_toEndOf="@id/help_fragment_emoji_4"
                app:layout_constraintTop_toTopOf="@id/help_fragment_emoji_4" />

            <org.thoughtcrime.securesms.components.emoji.EmojiImageView
                android:id="@+id/help_fragment_emoji_2"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_marginEnd="8dp"
                android:background="@drawable/help_fragment_emoji_radio_background"
                android:button="@null"
                android:gravity="center"
                android:scaleType="fitCenter"
                android:padding="4dp"
                app:layout_constraintBottom_toBottomOf="@id/help_fragment_emoji_3"
                app:layout_constraintEnd_toStartOf="@id/help_fragment_emoji_1"
                app:layout_constraintStart_toEndOf="@id/help_fragment_emoji_3"
                app:layout_constraintTop_toTopOf="@id/help_fragment_emoji_3" />

            <org.thoughtcrime.securesms.components.emoji.EmojiImageView
                android:id="@+id/help_fragment_emoji_1"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_marginEnd="16dp"
                android:background="@drawable/help_fragment_emoji_radio_background"
                android:button="@null"
                android:gravity="center"
                android:scaleType="fitCenter"
                android:padding="4dp"
                app:layout_constraintBottom_toBottomOf="@id/help_fragment_emoji_2"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/help_fragment_emoji_2"
                app:layout_constraintTop_toTopOf="@id/help_fragment_emoji_2" />

            <com.google.android.material.checkbox.MaterialCheckBox
                android:id="@+id/help_fragment_debug"
                android:layout_width="wrap_content"
                android:layout_height="0dp"
                android:layout_marginStart="16dp"
                android:checked="true"
                android:text="@string/HelpFragment__include_debug_log"
                android:textColor="?attr/signal_text_secondary"
                android:textSize="14sp"
                app:layout_constraintBottom_toBottomOf="@id/help_fragment_debug_info"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="@id/help_fragment_debug_info" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/help_fragment_debug_info"
                style="@style/Signal.Widget.Button.Large.Secondary"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="2dp"
                android:layout_marginTop="16dp"
                android:background="@android:color/transparent"
                android:text="@string/HelpFragment__whats_this"
                android:textAllCaps="false"
                android:textAppearance="@style/Signal.Text.Body"
                android:textSize="14sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0"
                app:layout_constraintStart_toEndOf="@id/help_fragment_debug"
                app:layout_constraintTop_toBottomOf="@id/help_fragment_emoji_1" />


        </androidx.constraintlayout.widget.ConstraintLayout>

    </ScrollView>

    <com.google.android.material.button.MaterialButton
        android:id="@+id/help_fragment_faq"
        style="@style/Signal.Widget.Button.Large.Secondary"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:gravity="start|center_vertical"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:paddingVertical="8dp"
        android:layout_marginBottom="16dp"
        android:text="@string/HelpFragment__have_you_read_our_faq_yet"
        android:textAllCaps="false"
        android:textAppearance="@style/Signal.Text.Body"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/help_fragment_next"
        app:layout_constraintStart_toStartOf="parent" />

    <org.thoughtcrime.securesms.util.views.CircularProgressMaterialButton
        android:id="@+id/help_fragment_next"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:enabled="false"
        app:circularProgressMaterialButton__label="@string/HelpFragment__next"
        app:layout_constraintBottom_toBottomOf="@id/help_fragment_faq"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/help_fragment_faq"
        app:layout_constraintTop_toTopOf="@id/help_fragment_faq" />

    <View
        android:id="@+id/help_fragment_next_toaster"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginEnd="16dp"
        android:enabled="true"
        app:layout_constraintBottom_toBottomOf="@id/help_fragment_faq"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/help_fragment_faq"
        app:layout_constraintTop_toTopOf="@id/help_fragment_faq" />

</androidx.constraintlayout.widget.ConstraintLayout>