<?xml version="1.0" encoding="utf-8"?>

<layout xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>
        <variable
            name="view"
            type="it.integry.integrywmsnative.view.dialogs.ask_should_versamento_automatico_ul.DialogAskShouldVersamentoAutomaticoULView" />
    </data>

    <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:orientation="vertical"
        app:cardCornerRadius="12dp"
        app:cardElevation="0dp">

        <androidx.appcompat.widget.LinearLayoutCompat
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/light_blue_300"
                android:gravity="center_horizontal">

                <androidx.appcompat.widget.AppCompatImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_margin="24dp"
                    android:src="@drawable/ic_error_white_24dp" />

            </RelativeLayout>


            <androidx.appcompat.widget.LinearLayoutCompat
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingLeft="24dp"
                android:paddingTop="24dp"
                android:paddingRight="24dp">

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/title_text"
                    style="@style/TextViewMaterial.Dialog.HeadlineText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_horizontal"
                    android:text="@string/versamento_automatico" />

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/description_text"
                    style="@style/TextViewMaterial"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:layout_marginBottom="16dp"
                    android:gravity="left"
                    android:text="@string/ask_should_versamento_automatico" />


                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp">

                    <androidx.constraintlayout.widget.Guideline
                        android:id="@+id/center_buttons_guideline"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        app:layout_constraintGuide_percent="0.5" />


                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/button_abort"
                        style="@style/Button.PrimaryOutline"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="8dp"
                        android:layout_marginRight="8dp"
                        android:text="@string/no"
                        app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:strokeColor="@color/colorPrimary"
                        android:onClick="@{() -> view.abort()}" />


                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/button_confirm"
                        style="@style/Button.PrimaryFull"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="8dp"
                        android:layout_marginRight="8dp"
                        android:text="@string/yes"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
                        app:layout_constraintTop_toTopOf="parent"
                        android:onClick="@{() -> view.confirm()}"/>


                </androidx.constraintlayout.widget.ConstraintLayout>

            </androidx.appcompat.widget.LinearLayoutCompat>


        </androidx.appcompat.widget.LinearLayoutCompat>


    </androidx.cardview.widget.CardView>

</layout>