<?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"
    app:cardBackgroundColor="@color/white"
    app:cardCornerRadius="@dimen/matter_12dp"
    app:cardElevation="8dp"
    app:strokeWidth="0dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="@dimen/matter_20dp">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fontFamily="@font/stolzl_bold"
            android:text="@string/update_firmware"
            android:textColor="@color/silabs_redtheme_scanner_header_text_color"
            android:textSize="@dimen/text_size_L"
            android:textStyle="bold" />

        <!-- IP -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/matter_16dp"
            android:baselineAligned="true"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="0.38"
                android:fontFamily="@font/stolzl_bold"
                android:gravity="end|center_vertical"
                android:labelFor="@id/wifi_ip_address"
                android:text="@string/ip"
                android:textAlignment="viewEnd"
                android:textColor="@color/silabs_redtheme_scanner_header_text_color"
                android:textSize="@dimen/text_size_ML" />

            <TextView
                android:id="@+id/wifi_ip_address"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/matter_12dp"
                android:layout_weight="0.62"
                android:ellipsize="end"
                android:fontFamily="@font/stolzl_regular"
                android:gravity="start|center_vertical"
                android:maxLines="1"
                android:textAlignment="viewStart"
                android:textColor="@color/silabs_redtheme_scanner_body_text_color"
                android:textSize="@dimen/text_size_ML"
                tools:text="192.168.1.123" />
        </LinearLayout>

        <!-- Server port -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/matter_8dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="0.38"
                android:fontFamily="@font/stolzl_bold"
                android:gravity="end|center_vertical"
                android:labelFor="@id/wifi_port"
                android:text="@string/port"
                android:textAlignment="viewEnd"
                android:textColor="@color/silabs_redtheme_scanner_header_text_color"
                android:textSize="@dimen/text_size_ML" />

            <TextView
                android:id="@+id/wifi_port"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/matter_12dp"
                android:layout_weight="0.62"
                android:ellipsize="end"
                android:fontFamily="@font/stolzl_regular"
                android:gravity="start|center_vertical"
                android:maxLines="1"
                android:textAlignment="viewStart"
                android:textColor="@color/silabs_redtheme_scanner_body_text_color"
                android:textSize="@dimen/text_size_ML"
                tools:text="5000" />
        </LinearLayout>

        <!-- File name -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/matter_8dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="0.38"
                android:fontFamily="@font/stolzl_bold"
                android:gravity="end|center_vertical"
                android:labelFor="@id/file_name"
                android:text="@string/File_Name_colon"
                android:textAlignment="viewEnd"
                android:textColor="@color/silabs_redtheme_scanner_header_text_color"
                android:textSize="@dimen/text_size_ML" />

            <TextView
                android:id="@+id/file_name"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/matter_12dp"
                android:layout_weight="0.62"
                android:ellipsize="end"
                android:fontFamily="@font/stolzl_regular"
                android:gravity="start|center_vertical"
                android:maxLines="1"
                android:textAlignment="viewStart"
                android:textColor="@color/silabs_redtheme_scanner_body_text_color"
                android:textSize="@dimen/text_size_ML"
                tools:text="RS916W.2.9.0.0.74 1 2.rps" />
        </LinearLayout>

        <!-- File size -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/matter_8dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="0.38"
                android:fontFamily="@font/stolzl_bold"
                android:gravity="end|center_vertical"
                android:labelFor="@id/file_size"
                android:text="@string/File_Size_colon"
                android:textAlignment="viewEnd"
                android:textColor="@color/silabs_redtheme_scanner_header_text_color"
                android:textSize="@dimen/text_size_ML" />

            <TextView
                android:id="@+id/file_size"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/matter_12dp"
                android:layout_weight="0.62"
                android:ellipsize="end"
                android:fontFamily="@font/stolzl_regular"
                android:gravity="start|center_vertical"
                android:maxLines="1"
                android:textAlignment="viewStart"
                android:textColor="@color/silabs_redtheme_scanner_body_text_color"
                android:textSize="@dimen/text_size_ML"
                tools:text="1768316.0 bytes" />
        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginTop="@dimen/matter_16dp"
            android:layout_marginBottom="@dimen/matter_12dp"
            android:background="@color/silabs_redtheme_select_device_outline_color" />

        <TextView
            android:id="@+id/data_rate"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fontFamily="@font/stolzl_medium"
            android:gravity="end"
            android:textSize="@dimen/advertisement_details_device_name_text_size"
            android:visibility="gone"
            tools:text="10.24 kbit/s" />

        <TextView
            android:id="@+id/ota_number_of_steps"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fontFamily="@font/stolzl_regular"
            android:textColor="@color/silabs_redtheme_scanner_body_text_color"
            android:textSize="@dimen/text_size_SM"
            android:visibility="gone"
            tools:text="1 OF 1"
            tools:visibility="visible" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <ProgressBar
                android:id="@+id/ota_progress_bar"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="0dp"
                android:layout_height="@dimen/matter_38dp"
                android:layout_weight="1"
                android:max="100"
                android:progressDrawable="@drawable/wifi_ota_horizontal_progress" />

            <TextView
                android:id="@+id/ota_progress_percent"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/matter_12dp"
                android:fontFamily="@font/stolzl_bold"
                android:gravity="center_vertical"
                android:minWidth="@dimen/matter_40dp"
                android:text="@string/zero_percent"
                android:textAlignment="viewEnd"
                android:textColor="@color/silabs_redtheme_scanner_header_text_color"
                android:textSize="@dimen/text_size_ML"
                android:textStyle="bold" />
        </LinearLayout>

        <Chronometer
            android:id="@+id/ota_chronometer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/matter_8dp"
            android:gravity="center_horizontal"
            android:textSize="@dimen/advertisement_details_title_text_size"
            android:textStyle="bold"
            android:visibility="gone" />

        <TextView
            android:id="@+id/text_firmware_status"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/matter_12dp"
            android:fontFamily="@font/stolzl_medium"
            android:gravity="center_horizontal"
            android:text="@string/waiting_for_client_to_connect"
            android:textColor="@color/silabs_redtheme_button_fill_color"
            android:textSize="@dimen/text_size_ML" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/otabutton"
            android:layout_width="@dimen/matter_100dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/matter_20dp"
            android:fontFamily="@font/stolzl_bold"
            android:minHeight="@dimen/matter_48dp"
            android:layout_gravity="center_horizontal"
            android:text="@string/button_cancel"
            android:textAllCaps="false"
            android:textColor="@color/silabs_white"
            android:textSize="@dimen/text_size_SM"
            android:textStyle="bold"
            app:backgroundTint="@color/silabs_redtheme_button_fill_color"
            app:cornerRadius="@dimen/silabs_btn_radius"
            app:rippleColor="@color/sl_light_grey" />

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/cancel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone" />
    </LinearLayout>
</com.google.android.material.card.MaterialCardView>
