<?xml version="1.0" encoding="utf-8"?>
<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:orientation="vertical"
    android:paddingLeft="16dp"
    android:paddingTop="16dp"
    android:paddingRight="16dp"
    android:paddingBottom="0dp">

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/file_chosen_label"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/file_chosen_label"
        android:textAppearance="@style/TextAppearance.AppCompat.Body2"
        app:layout_constraintBottom_toTopOf="@id/file_path"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/file_path"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/file_chosen_label"
        tools:text="file path file path file path file path file path file path file path file path file path file path file path " />

    <androidx.appcompat.widget.AppCompatCheckBox
        android:id="@+id/cbSettings"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:checked="true"
        android:text="@string/dialog_export_settings"
        app:layout_constraintBottom_toTopOf="@id/cbAccounts"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/file_path" />

    <androidx.appcompat.widget.AppCompatCheckBox
        android:id="@+id/cbAccounts"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/dialog_export_accounts"
        app:layout_constraintBottom_toTopOf="@id/cbFavorites"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/cbSettings" />

    <androidx.appcompat.widget.AppCompatCheckBox
        android:id="@+id/cbFavorites"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/dialog_export_favorites"
        app:layout_constraintBottom_toTopOf="@id/top_password_divider"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/cbAccounts" />

    <include
        android:id="@+id/top_password_divider"
        layout="@layout/item_pref_divider"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        app:layout_constraintBottom_toTopOf="@id/enter_password_label"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/cbFavorites" />

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/enter_password_label"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:layout_marginBottom="4dp"
        android:text="@string/enter_password"
        android:textAppearance="@style/TextAppearance.AppCompat.Body1"
        app:layout_constraintBottom_toTopOf="@id/passwordField"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/top_password_divider" />

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/passwordField"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:hint="@string/password_no_max"
        app:counterEnabled="true"
        app:counterMaxLength="32"
        app:endIconMode="password_toggle"
        app:layout_constraintBottom_toTopOf="@id/bottom_password_divider"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/enter_password_label">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/etPassword"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:autofillHints="no"
            android:inputType="textPassword"
            android:maxLength="2200"
            android:scrollHorizontally="false"
            tools:text="test" />

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

    <include
        android:id="@+id/bottom_password_divider"
        layout="@layout/item_pref_divider"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        app:layout_constraintBottom_toTopOf="@id/btn_restore"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/passwordField" />

    <com.google.android.material.button.MaterialButton
        android:id="@+id/btn_restore"
        style="@style/Widget.MaterialComponents.Button.TextButton.Dialog.Flush"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end"
        android:layout_marginTop="16dp"
        android:text="@string/restore_backup"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/bottom_password_divider" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/password_group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:constraint_referenced_ids="top_password_divider,bottom_password_divider,enter_password_label,passwordField"
        tools:visibility="visible" />


</androidx.constraintlayout.widget.ConstraintLayout>