<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <data>

        <import type="android.view.View" />

        <variable
            name="view"
            type="it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView" />

    </data>

    <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/base_root"
        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:id="@+id/title_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/green_300"
                android:gravity="center_horizontal">

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/title_icon"
                    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:id="@+id/base_buttons_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingStart="16dp"
                android:paddingTop="24dp"
                android:paddingEnd="16dp"
                android:paddingBottom="16dp">

                <TextView
                    android:id="@+id/title_text"
                    style="@style/TextViewMaterial.DialogTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_horizontal"
                    tools:text="Title here" />

                <TextView
                    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"
                    tools:text="Description here" />


                <androidx.appcompat.widget.LinearLayoutCompat
                    android:id="@+id/dialog_content_hashmap"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="12dp"
                    android:orientation="vertical"
                    android:paddingLeft="12dp"
                    android:paddingRight="12dp">


                </androidx.appcompat.widget.LinearLayoutCompat>


                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:visibility="@{view.negativeVisible &amp;&amp; !view.neutralVisible ? View.VISIBLE : View.GONE}">

                    <androidx.constraintlayout.widget.Guideline
                        android:id="@+id/center_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
                        style="@style/Button.PrimaryOutline"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="8dp"
                        android:layout_marginRight="8dp"
                        android:onClick="@{() -> view.onNegativeClick()}"
                        android:text="@{view.negativeButtonText}"
                        app:layout_constraintEnd_toStartOf="@id/center_guideline"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:strokeColor="@color/colorPrimary" />


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


                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:visibility="@{!view.negativeVisible &amp;&amp; !view.neutralVisible ? View.VISIBLE : View.GONE}">


                    <androidx.constraintlayout.widget.Guideline
                        android:id="@+id/ok_left_buttons_guideline"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        app:layout_constraintGuide_percent="0.25" />

                    <androidx.constraintlayout.widget.Guideline
                        android:id="@+id/ok_right_buttons_guideline"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        app:layout_constraintGuide_percent="0.75" />

                    <com.google.android.material.button.MaterialButton
                        style="@style/Button.PrimaryFull"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="8dp"
                        android:layout_marginRight="8dp"

                        android:onClick="@{() -> view.onPositiveClick()}"
                        android:text="@{view.positiveButtonText}"
                        app:layout_constraintEnd_toEndOf="@id/ok_right_buttons_guideline"
                        app:layout_constraintStart_toStartOf="@id/ok_left_buttons_guideline"
                        app:layout_constraintTop_toTopOf="parent" />


                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:visibility="@{view.negativeVisible &amp;&amp; view.neutralVisible ? View.VISIBLE : View.GONE}">

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

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


                    <com.google.android.material.button.MaterialButton
                        style="@style/Button.DangerFull"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="8dp"
                        android:layout_marginRight="8dp"
                        android:onClick="@{() -> view.onNegativeClick()}"
                        android:text="@{view.negativeButtonText}"
                        app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />


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


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


                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:visibility="@{!view.negativeVisible &amp;&amp; view.neutralVisible ? View.VISIBLE : View.GONE}">

                    <androidx.constraintlayout.widget.Guideline
                        android:id="@+id/center_guideline2"
                        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
                        style="@style/Button.PrimaryOutline"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="8dp"
                        android:layout_marginRight="8dp"
                        android:onClick="@{() -> view.onNeutralClick()}"
                        android:text="@{view.neutralButtonText}"
                        app:layout_constraintEnd_toStartOf="@id/center_guideline2"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:strokeColor="@color/colorPrimary" />


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


                </androidx.constraintlayout.widget.ConstraintLayout>

            </androidx.appcompat.widget.LinearLayoutCompat>


        </androidx.appcompat.widget.LinearLayoutCompat>


    </androidx.cardview.widget.CardView>


</layout>