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

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".ui.settings.SettingsFragment">

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipToPadding="false"
            android:fitsSystemWindows="true">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:padding="20dp">

                <com.google.android.material.card.MaterialCardView
                    style="@style/Widget.Material3.CardView.Filled"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:cardBackgroundColor="?attr/colorSurfaceContainer">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:padding="16dp">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="16dp"
                            android:text="Server Settings"
                            android:textColor="?attr/colorPrimary"
                            android:textSize="14sp"
                            android:textStyle="bold" />

                        <com.google.android.material.textfield.TextInputLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:hint="Name">

                            <com.google.android.material.textfield.TextInputEditText
                                android:id="@+id/et_device_label"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:lines="1" />
                        </com.google.android.material.textfield.TextInputLayout>

                        <com.google.android.material.textfield.TextInputLayout
                            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="16dp"
                            android:hint="Server">

                            <com.google.android.material.textfield.MaterialAutoCompleteTextView
                                android:id="@+id/et_server"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content" />

                        </com.google.android.material.textfield.TextInputLayout>

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/btn_server"
                            android:layout_width="120dp"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center"
                            android:layout_marginTop="16dp"
                            android:text="Save" />
                    </LinearLayout>
                </com.google.android.material.card.MaterialCardView>


                <com.google.android.material.card.MaterialCardView
                    style="@style/Widget.Material3.CardView.Filled"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    app:cardBackgroundColor="?attr/colorSurfaceContainer">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:padding="16dp">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="16dp"
                            android:text="SIM Settings"
                            android:textColor="?attr/colorPrimary"
                            android:textSize="14sp"
                            android:textStyle="bold" />

                        <com.google.android.material.textfield.TextInputLayout
                            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:hint="Channel">

                            <com.google.android.material.textfield.MaterialAutoCompleteTextView
                                android:id="@+id/et_channel"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:inputType="none" />

                        </com.google.android.material.textfield.TextInputLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="16dp"
                            android:orientation="horizontal">

                            <com.google.android.material.textfield.TextInputLayout
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:hint="MCC">

                                <com.google.android.material.textfield.TextInputEditText
                                    android:id="@+id/et_mcc"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:inputType="number"
                                    android:lines="1" />
                            </com.google.android.material.textfield.TextInputLayout>

                            <com.google.android.material.textfield.TextInputLayout
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_marginLeft="16dp"
                                android:layout_weight="1"
                                android:hint="MNC">

                                <com.google.android.material.textfield.TextInputEditText
                                    android:id="@+id/et_mnc"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:inputType="number"
                                    android:lines="1" />
                            </com.google.android.material.textfield.TextInputLayout>

                            <com.google.android.material.textfield.TextInputLayout
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_marginLeft="16dp"
                                android:layout_weight="1"
                                android:hint="Country">

                                <com.google.android.material.textfield.TextInputEditText
                                    android:id="@+id/et_country"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:lines="1" />
                            </com.google.android.material.textfield.TextInputLayout>

                            <com.google.android.material.textfield.TextInputLayout
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_marginLeft="16dp"
                                android:layout_weight="1"
                                android:hint="Code">

                                <com.google.android.material.textfield.TextInputEditText
                                    android:id="@+id/et_area_code"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:inputType="number"
                                    android:lines="1" />
                            </com.google.android.material.textfield.TextInputLayout>
                        </LinearLayout>

                        <com.google.android.material.textfield.TextInputLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="16dp"
                            android:hint="Number">

                            <com.google.android.material.textfield.TextInputEditText
                                android:id="@+id/et_number"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:inputType="number"
                                android:lines="1" />
                        </com.google.android.material.textfield.TextInputLayout>


                        <com.google.android.material.textfield.TextInputLayout
                            android:id="@+id/tl_iccid"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="16dp"
                            android:hint="ICCID"
                            app:endIconDrawable="@drawable/ic_refresh"
                            app:endIconMode="custom">

                            <com.google.android.material.textfield.TextInputEditText
                                android:id="@+id/et_iccid"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:inputType="number"
                                android:lines="1" />
                        </com.google.android.material.textfield.TextInputLayout>

                        <com.google.android.material.textfield.TextInputLayout
                            android:id="@+id/tl_imei"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="16dp"
                            android:hint="IMEI"
                            app:endIconDrawable="@drawable/ic_refresh"
                            app:endIconMode="custom">

                            <com.google.android.material.textfield.TextInputEditText
                                android:id="@+id/et_imei"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:inputType="number"
                                android:lines="1" />
                        </com.google.android.material.textfield.TextInputLayout>

                        <com.google.android.material.textfield.TextInputLayout
                            android:id="@+id/tl_imsi"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="16dp"
                            android:hint="IMSI"
                            app:endIconDrawable="@drawable/ic_refresh"
                            app:endIconMode="custom">

                            <com.google.android.material.textfield.TextInputEditText
                                android:id="@+id/et_imsi"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:inputType="number"
                                android:lines="1" />
                        </com.google.android.material.textfield.TextInputLayout>


                        <LinearLayout
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center_horizontal"
                            android:layout_marginTop="16dp"
                            android:orientation="horizontal">

                            <com.google.android.material.button.MaterialButton
                                android:id="@+id/btn_request"
                                style="?attr/materialIconButtonFilledTonalStyle"
                                android:layout_width="120dp"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center"
                                android:text="Request"
                                android:visibility="visible" />

                            <com.google.android.material.button.MaterialButton
                                android:id="@+id/btn_save"
                                android:layout_width="120dp"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center"
                                android:layout_marginLeft="16dp"
                                android:text="Save"
                                android:visibility="visible" />
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="8dp"
                            android:gravity="center"
                            android:orientation="horizontal">

                            <com.google.android.material.button.MaterialButton
                                android:id="@+id/btn_check"
                                android:layout_width="120dp"
                                android:layout_height="wrap_content"
                                android:text="Check"
                                android:visibility="visible" />
                        </LinearLayout>
                    </LinearLayout>
                </com.google.android.material.card.MaterialCardView>

                <com.google.android.material.card.MaterialCardView
                    style="@style/Widget.Material3.CardView.Filled"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    app:cardBackgroundColor="?attr/colorSurfaceContainer">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:padding="16dp">

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/switch_clean"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="DO NOT CLEAN" />

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/switch_request"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="8dp"
                            android:text="DO NOT REQUEST" />

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/sw_reset"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="8dp"
                            android:text="DO NOT RESET" />
                    </LinearLayout>

                </com.google.android.material.card.MaterialCardView>


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