<?xml version="1.0" encoding="utf-8"?>
<layout 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">

    <data>

        <variable
            name="mViewModel"
            type="com.yogeshpaliyal.keypass.ui.addTOTP.AddTOTPViewModel" />

    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".ui.addTOTP.AddTOTPActivity">

        <com.google.android.material.appbar.MaterialToolbar
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            android:id="@+id/toolbar"
            app:navigationIcon="@drawable/ic_baseline_arrow_back_ios_24"/>


        <com.google.android.material.textfield.TextInputLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            app:layout_constraintTop_toBottomOf="@id/toolbar"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:endIconDrawable="@drawable/ic_twotone_qr_code_scanner_24"
            app:endIconMode="custom"
            android:id="@+id/tilSecretKey"
            android:layout_marginTop="@dimen/grid_3"
            android:layout_marginHorizontal="@dimen/grid_2">
            <com.google.android.material.textfield.TextInputEditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="Secret Key"
                android:text="@={mViewModel.secretKey}"
                android:id="@+id/etSecretKey"/>
        </com.google.android.material.textfield.TextInputLayout>

        <com.google.android.material.textfield.TextInputLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            app:layout_constraintTop_toBottomOf="@id/tilSecretKey"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:endIconMode="custom"
            android:id="@+id/tilAccountName"
            android:layout_marginTop="@dimen/grid_2"
            android:layout_marginHorizontal="@dimen/grid_2">
            <com.google.android.material.textfield.TextInputEditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/account_name"
                android:text="@={mViewModel.accountName}"
                android:id="@+id/etAccount"/>
        </com.google.android.material.textfield.TextInputLayout>


        <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            android:layout_margin="@dimen/grid_2"
            android:text="Save"
            android:id="@+id/btnSave"
            app:icon="@drawable/ic_round_done_24"
            android:textColor="?attr/colorOnSecondary"/>

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