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

    style="@style/list_item_card_view_box"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" >

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

        <LinearLayout
            style="@style/list_item_card_view_container_margins"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" >

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

                <ImageView
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:src="@drawable/redesign_ic_bluetooth_with_background"
                    android:contentDescription="@string/content_desc_gatt_server_icon" />

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:orientation="vertical"
                    android:gravity="center_vertical"
                    android:layout_marginStart="@dimen/space_S" >

                    <TextView
                        android:id="@+id/tv_device_name"
                        style="@style/list_item_card_view_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        tools:text="New Advertiser" />

                    <TextView
                        android:id="@+id/tv_advertiser_address"
                        style="@style/list_item_card_view_text_info_ellipsized"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        tools:text="xx:xx:xx:xx:xx:xx"/>

                </LinearLayout>

                <androidx.appcompat.widget.SwitchCompat
                    android:id="@+id/sw_advertiser"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:minWidth="32dp"
                    android:padding="0dp"
                    android:thumb="@drawable/sw_thumb"
                    app:splitTrack="false"
                    app:switchMinWidth="32dp"
                    app:track="@drawable/sw_track" />

            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginVertical="@dimen/space_XS"
                android:background="?android:attr/listDivider" />

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

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical"
                    tools:ignore="UseCompoundDrawables">

                    <ImageView
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:layout_marginBottom="@dimen/space_XXS"
                        android:contentDescription="@string/advertiser_label_tx_power"
                        android:src="@drawable/redesign_ic_wifi"
                        android:layout_gravity="center"
                        app:tint="@color/silabs_dark_gray_icon" />

                    <TextView
                        android:id="@+id/tv_tx_power"
                        style="@style/list_item_card_view_text_info_ellipsized"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        tools:text="-40 dBm"
                        android:gravity="center_horizontal" />

                </LinearLayout>

                <View
                    android:layout_width="1dp"
                    android:layout_height="match_parent"
                    android:layout_marginHorizontal="@dimen/card_view_vertical_separator_horizontal_margin"
                    android:background="?android:attr/listDivider" />

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical"
                    tools:ignore="UseCompoundDrawables">

                    <ImageView
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:layout_marginBottom="@dimen/space_XXS"
                        android:layout_gravity="center_horizontal"
                        android:contentDescription="@string/advertiser_label_interval"
                        android:src="@drawable/redesign_ic_clock"
                        app:tint="@color/silabs_dark_gray_icon" />

                    <TextView
                        android:id="@+id/tv_interval"
                        style="@style/list_item_card_view_text_info_ellipsized"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center_horizontal"
                        tools:text="325 ms" />

                </LinearLayout>



                <View
                    android:layout_width="1dp"
                    android:layout_height="match_parent"
                    android:layout_marginHorizontal="@dimen/card_view_vertical_separator_horizontal_margin"
                    android:background="?android:attr/listDivider" />

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1.2"
                    android:orientation="vertical"
                    tools:ignore="UseCompoundDrawables">

                    <ImageView
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:layout_gravity="center_horizontal"
                        android:layout_marginBottom="@dimen/space_XXS"
                        android:contentDescription="@string/advertiser_label_interval"
                        android:src="@drawable/ic_beacon_ibeacon"
                        app:tint="@color/silabs_dark_gray_icon" />

                    <TextView
                        android:id="@+id/tv_beacon_type"
                        style="@style/list_item_card_view_text_info_stat"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/advertiser_setting_beacon_unspecified" />

                </LinearLayout>

                <View
                    android:layout_width="1dp"
                    android:layout_height="match_parent"
                    android:layout_marginHorizontal="@dimen/card_view_vertical_separator_horizontal_margin"
                    android:background="?android:attr/listDivider" />

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1.2"
                    android:orientation="vertical"
                    tools:ignore="UseCompoundDrawables">

                    <ImageView
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:layout_gravity="center_horizontal"
                        android:layout_marginBottom="@dimen/space_XXS"
                        android:contentDescription="@string/advertiser_label_interval"
                        android:src="@drawable/redesign_ic_bluetooth"
                        app:tint="@color/silabs_dark_gray_icon" />

                    <TextView
                        android:id="@+id/tv_connectible"
                        style="@style/list_item_card_view_text_info_stat"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        tools:text="Connectible" />

                </LinearLayout>

            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginVertical="@dimen/space_XS"
                android:background="?android:attr/listDivider" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/card_view_margin_vertical">

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/ib_edit"
                    style="@style/Widget.Material3.Button.IconButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:contentDescription="@string/label_edit"
                    app:icon="@drawable/redesign_ic_card_view_action_icon_edit"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/ib_copy"
                    style="@style/Widget.Material3.Button.IconButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/space_XS"
                    android:contentDescription="@string/label_copy"
                    app:icon="@drawable/redesign_ic_card_view_action_icon_copy"
                    app:layout_constraintStart_toEndOf="@id/ib_edit"
                    app:layout_constraintTop_toTopOf="parent" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/ib_remove"
                    style="@style/Widget.Material3.Button.IconButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/space_XS"
                    android:contentDescription="@string/label_remove"
                    app:icon="@drawable/redesign_ic_card_view_action_icon_delete"
                    app:layout_constraintStart_toEndOf="@id/ib_copy"
                    app:layout_constraintTop_toTopOf="parent" />

                <com.siliconlabs.bledemo.common.views.ExpandArrow
                    android:id="@+id/expand_arrow"
                    style="@style/Widget.Material3.Button.IconButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:contentDescription="@string/content_desc_dropdown_arrow"
                    android:layout_alignParentEnd="true"
                    android:layout_centerVertical="true"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </LinearLayout>

        <LinearLayout
            android:id="@+id/ll_advertisement_details"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:visibility="gone"
            tools:visibility="visible" />

    </LinearLayout>

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