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

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

        <import type="it.integry.integrywmsnative.core.utility.UtilityString" />

        <variable
            name="title"
            type="String" />

        <variable
            name="subtitle"
            type="String" />
    </data>


    <LinearLayout
        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
            style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:text="@{title}"
            tools:text="Loading" />

        <androidx.appcompat.widget.AppCompatTextView
            style="@style/MaterialAlertDialog.Material3.Body.Text.CenterStacked"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:text="@{subtitle}"
            android:visibility="@{UtilityString.isNullOrEmpty(subtitle) ? View.GONE : View.VISIBLE}"
            tools:text="@string/loading" />


        <ProgressBar
            android:id="@+id/progressBar"
            style="@style/Widget.AppCompat.ProgressBar.Horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:layout_marginBottom="24dp"
            android:indeterminate="true" />

    </LinearLayout>


</layout>