<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginHorizontal="@dimen/space_S"
    app:cardBackgroundColor="@color/silabs_white"
    app:cardCornerRadius="@dimen/dialog_corner_radius"
    app:cardElevation="2dp"
    app:strokeColor="@color/silabs_divider"
    app:strokeWidth="1dp">

    <LinearLayout
        style="@style/dialog_margins"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="@dimen/dialog_margin_horizontal"
        android:orientation="vertical">

        <TextView
            style="@style/dialog_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:layout_marginBottom="@dimen/dialog_title_margin_bottom"
            android:fontFamily="@font/stolzl_bold"
            android:gravity="start"
            android:text="@string/OTA_Device_Firmware_Update"
            android:textSize="@dimen/dialog_title_size" />

        <TextView
            style="@style/dialog_text_info"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/space_S"
            android:gravity="start"
            android:text="@string/ota_dfu_description" />

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fillViewport="false">

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

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <TextView
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="0.3"
                        android:fontFamily="@font/stolzl_bold"
                        android:gravity="start|center_vertical"
                        android:text="@string/type_colon"
                        android:textColor="@color/silabs_redtheme_header_text_color"
                        android:textSize="@dimen/ota_config_dialog_text_size" />

                    <RadioGroup
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="0.7"
                        android:orientation="horizontal">

                        <RadioButton
                            android:id="@+id/rb_type_partial"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:buttonTint="@color/silabs_redtheme_primary_color"
                            android:checked="true"
                            android:fontFamily="@font/stolzl_regular"
                            android:text="@string/ota_type_partial"
                            android:textColor="@color/silabs_redtheme_header_text_color"
                            android:textSize="@dimen/ota_config_dialog_text_size" />

                        <RadioButton
                            android:id="@+id/rb_type_full"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:buttonTint="@color/silabs_redtheme_primary_color"
                            android:fontFamily="@font/stolzl_regular"
                            android:text="@string/ota_type_full"
                            android:textColor="@color/silabs_redtheme_header_text_color"
                            android:textSize="@dimen/ota_config_dialog_text_size" />
                    </RadioGroup>
                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/space_S">

                    <TextView
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="0.3"
                        android:fontFamily="@font/stolzl_bold"
                        android:gravity="start|center_vertical"
                        android:text="@string/Mode_colon"
                        android:textColor="@color/silabs_redtheme_header_text_color"
                        android:textSize="@dimen/ota_config_dialog_text_size" />

                    <RadioGroup
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="0.7"
                        android:orientation="horizontal">

                        <RadioButton
                            android:id="@+id/reliability_radio_button"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:buttonTint="@color/silabs_redtheme_primary_color"
                            android:checked="true"
                            android:fontFamily="@font/stolzl_regular"
                            android:text="@string/Reliability"
                            android:textColor="@color/silabs_redtheme_header_text_color"
                            android:textSize="@dimen/ota_config_dialog_text_size" />

                        <RadioButton
                            android:id="@+id/speed_radio_button"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:buttonTint="@color/silabs_redtheme_primary_color"
                            android:fontFamily="@font/stolzl_regular"
                            android:text="@string/Speed"
                            android:textColor="@color/silabs_redtheme_header_text_color"
                            android:textSize="@dimen/ota_config_dialog_text_size" />
                    </RadioGroup>
                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:layout_marginVertical="@dimen/space_S"
                    android:background="@color/divider_line" />

                <LinearLayout
                    android:layout_gravity="start"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="@dimen/space_XS">

                    <TextView
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="0.3"
                        android:fontFamily="@font/stolzl_bold"
                        android:gravity="start|center_vertical"
                        android:text="@string/Application_colon"
                        android:textColor="@color/silabs_redtheme_header_text_color"
                        android:textSize="@dimen/ota_config_dialog_text_size" />

                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/select_app_file_btn"
                        style="@style/ota_config_file_link_button"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="0.7"
                        android:gravity="center"
                        android:minHeight="48dp"
                        android:text="@string/ota_config_choose_file" />
                </LinearLayout>

                <LinearLayout
                    android:id="@+id/app_loader_layout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:visibility="gone"
                    tools:visibility="visible">

                    <TextView
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="0.3"
                        android:fontFamily="@font/stolzl_bold"
                        android:gravity="start|center_vertical"
                        android:text="@string/Apploader_colon"
                        android:textColor="@color/silabs_redtheme_header_text_color"
                        android:textSize="@dimen/ota_config_dialog_text_size" />

                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/select_apploader_file_btn"
                        style="@style/ota_config_file_link_button"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="0.7"
                        android:gravity="center"
                        android:minHeight="48dp"
                        android:text="@string/ota_config_choose_file" />
                </LinearLayout>

            </LinearLayout>

        </ScrollView>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dialog_button_margin_top"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/ota_cancel"
                style="@style/Widget.MaterialComponents.Button.OutlinedButton"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/space_S"
                android:layout_weight="1"
                android:fontFamily="@font/stolzl_medium"
                android:minHeight="48dp"
                android:text="@string/button_cancel"
                android:textAllCaps="false"
                android:textColor="@color/silabs_primary_color"
                android:textSize="@dimen/text_size_M"
                android:textStyle="bold"
                app:backgroundTint="@color/silabs_white"
                app:cornerRadius="@dimen/silabs_btn_radius"
                app:strokeColor="@color/silabs_primary_color"
                app:strokeWidth="1dp" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/ota_proceed"
                style="@style/Widget.MaterialComponents.Button"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/space_S"
                android:layout_weight="1"
                android:enabled="false"
                android:fontFamily="@font/stolzl_medium"
                android:minHeight="48dp"
                android:text="@string/btn_upload"
                android:textAllCaps="false"
                android:textColor="@color/silabs_white"
                android:textStyle="bold"
                app:backgroundTint="@color/silabs_primary_color"
                app:cornerRadius="@dimen/silabs_btn_radius" />
        </LinearLayout>

    </LinearLayout>

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