<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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/ssss__root"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

        <ImageView
            android:id="@+id/ssss_shield"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_marginStart="16dp"
            android:importantForAccessibility="no"
            android:src="@drawable/ic_security_key_24dp"
            app:layout_constraintBottom_toBottomOf="@id/ssss_restore_with_key"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@id/ssss_restore_with_key"
            app:tint="?vctr_content_primary"
            tools:ignore="MissingPrefix" />

        <TextView
            android:id="@+id/ssss_restore_with_key"
            style="@style/Widget.Vector.TextView.HeadlineMedium"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginTop="36dp"
            android:layout_marginEnd="16dp"
            android:text="@string/recovery_key"
            android:textColor="?vctr_content_primary"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/ssss_shield"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/ssss_restore_with_key_text"
            style="@style/Widget.Vector.TextView.Subtitle"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:textColor="?vctr_content_primary"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/ssss_restore_with_key"
            tools:text="@string/enter_secret_storage_input_key" />

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/ssss_key_enter_til"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="16dp"
            android:layout_marginEnd="16dp"
            app:errorEnabled="true"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/ssss_restore_with_key_text">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/ssss_key_enter_edittext"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/recovery_key"
                android:imeOptions="actionDone"
                android:maxLines="3"
                android:singleLine="false"
                tools:inputType="textMultiLine" />

        </com.google.android.material.textfield.TextInputLayout>

        <!--        -->

        <Button
            android:id="@+id/ssss_key_use_file"
            style="@style/Widget.Vector.Button.Text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/use_file"
            app:icon="@drawable/ic_file"
            tools:ignore="MissingConstraints" />

        <Button
            android:id="@+id/ssss_key_submit"
            style="@style/Widget.Vector.Button.Text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/_continue"
            tools:ignore="MissingConstraints" />

        <androidx.constraintlayout.helper.widget.Flow
            android:id="@+id/ssss_key_flow"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="@dimen/layout_horizontal_margin"
            app:constraint_referenced_ids="ssss_key_use_file,ssss_key_submit"
            app:flow_horizontalStyle="spread_inside"
            app:flow_wrapMode="chain"
            app:layout_constraintBottom_toTopOf="@id/ssss_key_reset"
            app:layout_constraintTop_toBottomOf="@id/ssss_key_enter_til"
            app:layout_goneMarginBottom="@dimen/layout_vertical_margin_big" />

        <im.vector.app.core.ui.views.BottomSheetActionButton
            android:id="@+id/ssss_key_reset"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="32dp"
            app:actionTitle="@string/bad_passphrase_key_reset_all_action"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintTop_toBottomOf="@id/ssss_key_flow"
            app:leftIcon="@drawable/ic_alert_triangle"
            app:tint="?colorError"
            app:titleTextColor="?vctr_content_secondary" />

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