<?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:padding="@dimen/padding"
    tools:context=".HomeFragment">

    <LinearLayout
        android:id="@+id/saved_states"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/can_status"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/margin_big"
            app:strokeWidth="1dp"
            app:strokeColor="@color/stroke_color"
            app:cardElevation="0dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/can_status_logo"
                    android:layout_marginStart="@dimen/margin"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"/>

                <TextView
                    android:id="@+id/can_status_text"
                    android:textSize="@dimen/regular_text"
                    android:padding="@dimen/margin"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />

            </LinearLayout>

        </com.google.android.material.card.MaterialCardView>

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/pin_status"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/margin_big"
            app:strokeWidth="1dp"
            app:strokeColor="@color/stroke_color"
            app:cardElevation="0dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/pin_status_logo"
                    android:layout_marginStart="@dimen/margin"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"/>

                <TextView
                    android:id="@+id/pin_status_text"
                    android:textSize="@dimen/regular_text"
                    android:padding="@dimen/margin"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />

            </LinearLayout>

        </com.google.android.material.card.MaterialCardView>

    </LinearLayout>

    <LinearLayout
        android:id="@+id/id_card_detection"
        android:layout_margin="@dimen/margin_big"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/saved_states"
        app:layout_constraintBottom_toBottomOf="parent">

        <TextView
            android:id="@+id/detection_action_text"
            android:layout_margin="@dimen/margin_big"
            android:textSize="@dimen/regular_text"
            android:text="@string/action_detect"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <Button
        android:id="@+id/home_action_button"
        android:textSize="@dimen/regular_text"
        android:text="@string/try_again_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/margin_small"
        android:layout_marginStart="@dimen/margin_huge"
        android:visibility="gone"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/id_card_detection"/>

    <Button
        android:id="@+id/home_help_button"
        android:textSize="@dimen/regular_text"
        android:text="@string/help_text"
        android:layout_marginTop="@dimen/margin_small"
        android:layout_marginStart="@dimen/margin_huge"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        style="?attr/materialButtonOutlinedStyle"
        android:visibility="gone"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/home_action_button"/>

</androidx.constraintlayout.widget.ConstraintLayout>