<FrameLayout 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"
    tools:context=".ui.modules.login.recover.LoginRecoverFragment">

    <me.zhanghai.android.materialprogressbar.MaterialProgressBar
        android:id="@+id/loginRecoverProgress"
        style="@style/Widget.MaterialProgressBar.ProgressBar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:indeterminate="true"
        android:visibility="gone" />

    <androidx.core.widget.NestedScrollView
        android:id="@+id/nestedScrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:scrollbars="none"
        tools:visibility="visible">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/loginRecoverFormContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingBottom="16dp"
            android:visibility="visible">

            <TextView
                android:id="@+id/loginFormHeader"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginLeft="32dp"
                android:layout_marginTop="48dp"
                android:layout_marginEnd="32dp"
                android:layout_marginRight="32dp"
                android:gravity="center_horizontal"
                android:text="@string/login_recover_title"
                android:textSize="16sp"
                app:fontFamily="sans-serif-light"
                app:layout_constraintBottom_toTopOf="@+id/loginRecoverInfoMessage"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintVertical_chainStyle="packed" />

            <TextView
                android:id="@+id/loginRecoverInfoMessage"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="24dp"
                android:layout_marginEnd="32dp"
                android:gravity="center_horizontal"
                android:text="@string/login_recover_warning"
                android:textColor="?colorTimetableChange"
                app:layout_constraintBottom_toTopOf="@id/loginRecoverNameLayout"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/loginFormHeader" />

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/loginRecoverNameLayout"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="24dp"
                android:layout_marginLeft="24dp"
                android:layout_marginTop="24dp"
                android:layout_marginEnd="24dp"
                android:layout_marginRight="24dp"
                android:hint="@string/login_email_hint"
                app:errorEnabled="true"
                app:layout_constraintBottom_toTopOf="@+id/loginRecoverHostLayout"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/loginRecoverInfoMessage">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/loginRecoverName"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:autofillHints="emailAddress"
                    android:inputType="textEmailAddress"
                    android:maxLines="1"
                    tools:targetApi="o" />

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

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/loginRecoverHostLayout"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="24dp"
                android:layout_marginLeft="24dp"
                android:layout_marginTop="16dp"
                android:layout_marginEnd="24dp"
                android:layout_marginRight="24dp"
                android:hint="@string/login_host_hint"
                android:orientation="vertical"
                app:layout_constraintBottom_toTopOf="@+id/loginRecoverSymbolLayout"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/loginRecoverNameLayout">

                <AutoCompleteTextView
                    android:id="@+id/loginRecoverHost"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:editable="false"
                    tools:ignore="Deprecated,LabelFor" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/loginRecoverSymbolLayout"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="24dp"
                android:layout_marginLeft="24dp"
                android:layout_marginTop="24dp"
                android:layout_marginEnd="24dp"
                android:layout_marginRight="24dp"
                android:hint="@string/login_symbol_hint"
                app:errorEnabled="true"
                app:layout_constraintBottom_toTopOf="@+id/loginRecoverButton"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/loginRecoverHostLayout">

                <AutoCompleteTextView
                    android:id="@+id/loginRecoverSymbol"
                    style="@style/Widget.MaterialComponents.TextInputEditText.OutlinedBox"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:imeActionLabel="@string/login_sign_in"
                    android:imeOptions="actionDone"
                    android:inputType="textAutoComplete|textNoSuggestions"
                    android:maxLines="1"
                    tools:ignore="LabelFor" />
            </com.google.android.material.textfield.TextInputLayout>

            <Button
                android:id="@+id/loginRecoverButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="24dp"
                android:layout_marginRight="24dp"
                android:text="@string/login_recover"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/loginRecoverSymbolLayout" />

        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.core.widget.NestedScrollView>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/loginRecoverCaptchaContainer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">

        <WebView
            android:id="@+id/loginRecoverWebView"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <LinearLayout
        android:id="@+id/loginRecoverError"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:orientation="vertical"
        android:visibility="invisible"
        tools:ignore="UseCompoundDrawables"
        tools:visibility="invisible">

        <ImageView
            android:layout_width="100dp"
            android:layout_height="100dp"
            app:srcCompat="@drawable/ic_error"
            app:tint="?colorOnBackground"
            tools:ignore="contentDescription" />

        <TextView
            android:id="@+id/loginRecoverErrorMessage"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:gravity="center"
            android:padding="8dp"
            android:text="@string/error_unknown"
            android:textSize="20sp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:gravity="center"
            android:orientation="horizontal">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/loginRecoverErrorDetails"
                style="@style/Widget.MaterialComponents.Button.OutlinedButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="8dp"
                android:layout_marginRight="8dp"
                android:text="@string/all_details" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/loginRecoverErrorRetry"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/all_retry" />
        </LinearLayout>
    </LinearLayout>

    <androidx.core.widget.NestedScrollView
        android:id="@+id/loginRecoverSuccess"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:scrollbars="none"
        android:visibility="invisible"
        tools:visibility="invisible">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center"
            android:orientation="vertical"
            tools:ignore="UseCompoundDrawables">

            <ImageView
                android:layout_width="100dp"
                android:layout_height="100dp"
                app:srcCompat="@drawable/ic_all_done"
                app:tint="?colorOnBackground"
                tools:ignore="contentDescription" />

            <TextView
                android:id="@+id/loginRecoverSuccessTitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="35dp"
                android:layout_marginTop="20dp"
                android:layout_marginEnd="35dp"
                android:gravity="center"
                android:textSize="20sp"
                tools:text="Pomyślnie wysłano email!" />

            <TextView
                android:id="@+id/loginRecoverSuccessMessage"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="35dp"
                android:lineSpacingMultiplier="1.5"
                android:scrollbars="vertical"
                android:text="@string/login_recover"
                android:textSize="14sp"
                tools:text="@tools:sample/lorem/random" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/loginRecoverLogin"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end"
                android:layout_marginEnd="30dp"
                android:layout_marginBottom="30dp"
                android:text="@android:string/ok" />
        </LinearLayout>

    </androidx.core.widget.NestedScrollView>
</FrameLayout>
