<?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">

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/settingsImportList"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:visibility="gone"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
        app:layout_constraintBottom_toTopOf="@+id/bottomBar"
        app:layout_constraintTop_toTopOf="parent"
        tools:listitem="@layout/settings_import_account_list_item" />

    <Button
        android:id="@+id/pickDocumentButton"
        style="@style/Widget.AppCompat.Button.Colored"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="16dp"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="16dp"
        android:text="@string/settings_import_pick_document_button"
        app:layout_constraintBottom_toTopOf="@+id/bottomBar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ProgressBar
        android:id="@+id/loadingProgressBar"
        style="?android:attr/progressBarStyle"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:indeterminate="true"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@+id/pickDocumentButton"
        app:layout_constraintEnd_toEndOf="@+id/pickDocumentButton"
        app:layout_constraintStart_toStartOf="@+id/pickDocumentButton"
        app:layout_constraintTop_toTopOf="@+id/pickDocumentButton" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/bottomBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/bottomBarBackground"
        android:elevation="8dp"
        android:minHeight="56dp"
        app:layout_constraintBottom_toBottomOf="parent"
        tools:ignore="UnusedAttribute">

        <Button
            android:id="@+id/importButton"
            style="@style/Widget.AppCompat.Button.Colored"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            android:layout_marginEnd="8dp"
            android:layout_marginBottom="4dp"
            android:enabled="false"
            android:text="@string/settings_import_button"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toEndOf="@id/buttonBarrier" />

        <Button
            android:id="@+id/closeButton"
            style="@style/Widget.AppCompat.Button.Colored"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            android:layout_marginEnd="8dp"
            android:layout_marginBottom="4dp"
            android:text="@string/okay_action"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toEndOf="@id/buttonBarrier" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/buttonBarrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="left" />

        <ProgressBar
            android:id="@+id/importProgressBar"
            style="?android:attr/progressBarStyle"
            android:layout_width="32dp"
            android:layout_height="32dp"
            android:indeterminate="true"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="@+id/importButton"
            app:layout_constraintEnd_toEndOf="@+id/importButton"
            app:layout_constraintStart_toStartOf="@+id/importButton"
            app:layout_constraintTop_toTopOf="@+id/importButton" />

        <TextView
            android:id="@+id/statusText"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginTop="8dp"
            android:layout_marginEnd="16dp"
            android:layout_marginBottom="8dp"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/buttonBarrier"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="Importing…"
            tools:visibility="visible" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

