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

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/verdnatura_black">

        <include
            android:id="@+id/main_toolbar"
            layout="@layout/toolbar_fragment"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/scan_input"
            style="@style/ScanLineTextSearch"
            android:layout_width="match_parent"
            android:hint="@string/Escaneaetiqueta"
            android:inputType="textVisiblePassword"
            android:lines="1"
            android:maxLines="1"
            android:textColorHint="@android:color/white"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/main_toolbar" /> <!-- Ajustar a la toolbar -->

        <!-- Primer botón debajo del scan_input -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/scan_input">


            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:baselineAligned="false"
                android:orientation="horizontal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/scan_input">


                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:orientation="vertical">

                    <Button
                        android:id="@+id/button1"
                        style="@style/DefaultButton.DynamicButton"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/layout_margin_min"
                        android:onClick="generateQr"
                        android:tag="1"
                        android:text="@string/lunch"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@id/scan_input" />

                    <Button
                        android:id="@+id/button2"
                        style="@style/DefaultButton.DynamicButton"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/margin_bottom_dynamic"
                        android:onClick="generateQr"
                        android:tag="2"
                        android:text="@string/halfLunch"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@id/scan_input" />

                </LinearLayout>

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:orientation="vertical">

                    <Button
                        android:id="@+id/button3"
                        style="@style/DefaultButton.DynamicButton"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/layout_margin_min"
                        android:onClick="generateQr"
                        android:tag="3"
                        android:text="@string/menu"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@id/scan_input" />

                    <Button
                        android:id="@+id/button4"
                        style="@style/DefaultButton.DynamicButton"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/margin_bottom_dynamic"
                        android:onClick="generateQr"
                        android:tag="4"
                        android:text="@string/halfMenu"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@id/scan_input" />

                </LinearLayout>

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_marginTop="@dimen/layout_margin_prepicker"
                android:layout_weight="1"
                android:baselineAligned="false"
                android:orientation="vertical"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/scan_input">

                <ImageView
                    android:id="@+id/imageQr"
                    android:layout_width="match_parent"
                    android:layout_height="336dp"
                    android:visibility="invisible" />

                <TextView
                    android:id="@+id/txtOption"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:textColor="@color/verdnatura_white"
                    android:visibility="invisible">

                </TextView>


            </LinearLayout>

        </LinearLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>
