<?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">

    <data>

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

        <variable
            name="view"
            type="it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCView" />
    </data>

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:orientation="vertical"
        app:cardBackgroundColor="@android:color/transparent"
        app:cardCornerRadius="24dp"
        app:cardElevation="0dp">

        <androidx.cardview.widget.CardView
            android:id="@+id/base"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:orientation="vertical"
            app:cardBackgroundColor="@color/light_blue_300"
            app:cardCornerRadius="24dp"
            app:cardElevation="0dp">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="4dp"
                android:background="@drawable/dialog_card_child_bg"
                android:padding="24dp">


                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/title_text"
                    style="@style/TextViewMaterial.Dialog.HeadlineText"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:gravity="center_horizontal"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    android:text="@string/action_close_order" />

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/description_text"
                    style="@style/TextViewMaterial"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:layout_marginBottom="16dp"
                    android:gravity="left"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/title_text"
                    android:text="@string/message_print_SSCC_list_on_close_order" />

                <RadioGroup
                    android:id="@+id/radioGroup"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onCheckedChanged="@{view::onCheckChange}"
                    android:layout_marginTop="8dp"
                    app:layout_constraintTop_toBottomOf="@id/description_text">

                    <RadioButton
                        android:id="@+id/print_shipping_label"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:text="@string/action_print_shipping_SSCC" />

                    <RadioButton
                        android:id="@+id/print_production_label"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:text="@string/action_print_production_SSCC" />
                </RadioGroup>


                <com.google.android.material.button.MaterialButton
                    android:id="@+id/buttonPositive"
                    style="?attr/materialButtonOutlinedStyle"
                    android:layout_marginTop="12dp"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:onClick="@{() -> view.onPositiveClick()}"
                    android:text="@string/confirm"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/radioGroup" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/buttonNegative"
                    style="@style/Button.DangerOutline"
                    android:layout_marginTop="12dp"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:onClick="@{() -> view.onNegativeClick()}"
                    android:text="@string/abort"
                    android:layout_marginEnd="12dp"
                    android:layout_marginStart="12dp"
                    app:layout_constraintTop_toBottomOf="@id/radioGroup"
                    app:layout_constraintEnd_toStartOf="@id/buttonPositive"

                    />


            </androidx.constraintlayout.widget.ConstraintLayout>


        </androidx.cardview.widget.CardView>
    </androidx.cardview.widget.CardView>

</layout>