<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright 2025, The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<com.android.systemui.statusbar.notification.row.BundledNotificationInfo
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:id="@+id/notification_guts"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusable="true"
    android:clipChildren="false"
    android:clipToPadding="true"
    android:orientation="vertical"
    android:paddingStart="@*android:dimen/notification_2025_margin">

    <!-- Package Info -->
    <LinearLayout
        android:id="@+id/header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipChildren="false"
        android:clipToPadding="true">
        <ImageView
            android:id="@+id/pkg_icon"
            android:layout_width="@*android:dimen/notification_2025_icon_circle_size"
            android:layout_height="@*android:dimen/notification_2025_icon_circle_size"
            android:layout_marginTop="@*android:dimen/notification_2025_margin"
            android:layout_marginEnd="@*android:dimen/notification_2025_margin" />
        <LinearLayout
            android:id="@+id/names"
            android:layout_weight="1"
            android:layout_width="0dp"
            android:orientation="vertical"
            android:layout_height="wrap_content"
            android:layout_marginTop="@*android:dimen/notification_2025_margin"
            android:minHeight="@*android:dimen/notification_2025_icon_circle_size">
            <TextView
                android:id="@+id/channel_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textDirection="locale"
                style="@style/TextAppearance.NotificationImportanceChannel"/>
            <TextView
                android:id="@+id/group_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textDirection="locale"
                android:ellipsize="end"
                style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
            <TextView
                android:id="@+id/pkg_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                style="@style/TextAppearance.NotificationImportanceApp"
                android:ellipsize="end"
                android:textDirection="locale"
                android:maxLines="1"/>
            <TextView
                android:id="@+id/delegate_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                style="@style/TextAppearance.NotificationImportanceHeader"
                android:ellipsize="end"
                android:textDirection="locale"
                android:text="@string/notification_delegate_header"
                android:maxLines="1" />

        </LinearLayout>

        <!-- feedback for notificationassistantservice -->
        <ImageButton
            android:id="@+id/feedback"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            android:background="@drawable/ripple_drawable"
            android:contentDescription="@string/notification_guts_bundle_feedback"
            android:src="@*android:drawable/ic_feedback"
            android:padding="@*android:dimen/notification_2025_margin"
            android:tint="@androidprv:color/materialColorPrimary"/>

        <!-- Optional link to app. Only appears if the channel is not disabled and the app
        asked for it -->
        <ImageButton
            android:id="@+id/app_settings"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            android:background="@drawable/ripple_drawable"
            android:contentDescription="@string/notification_app_settings"
            android:src="@drawable/ic_info"
            android:padding="@*android:dimen/notification_2025_margin"
            android:tint="@androidprv:color/materialColorPrimary"/>

        <!-- System notification settings -->
        <ImageButton
            android:id="@+id/info"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:contentDescription="@string/notification_more_settings"
            android:background="@drawable/ripple_drawable"
            android:src="@drawable/ic_settings"
            android:padding="@*android:dimen/notification_2025_margin"
            android:tint="@androidprv:color/materialColorPrimary" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/inline_controls"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="@*android:dimen/notification_2025_margin"
        android:layout_marginTop="@*android:dimen/notification_2025_margin"
        android:layout_marginBottom="@*android:dimen/notification_2025_margin"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:orientation="vertical">

        <RelativeLayout
            android:id="@+id/classification_toggle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingVertical="@dimen/notification_2025_importance_button_padding_vertical"
            android:paddingHorizontal="@dimen/notification_2025_importance_button_padding_horizontal"
            android:background="@drawable/notification_2025_guts_feature_toggle_bg"
            android:orientation="horizontal">
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_toStartOf="@+id/feature_toggle"
                    android:layout_alignParentStart="true"
                    android:gravity="start|center_vertical">
                    <TextView
                        android:id="@+id/feature_label"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:maxLines="1"
                        android:clickable="false"
                        android:focusable="false"
                        android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
                        android:textSize="16sp"
                        android:textColor="@androidprv:color/materialColorOnSecondaryContainer"
                        android:lineSpacingExtra="4sp"
                        android:ellipsize="end"
                        android:text="@string/notification_guts_single_bundle_notif_title"/>
                    <TextView
                        android:id="@+id/feature_summary"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:clickable="false"
                        android:focusable="false"
                        android:maxLines="1"
                        android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
                        android:textSize="14sp"
                        android:textColor="@androidprv:color/materialColorOnSecondaryContainer"
                        android:ellipsize="end"
                        android:lineSpacingExtra="4sp" />
                </LinearLayout>
            <com.google.android.material.materialswitch.MaterialSwitch
                    android:theme="@style/Theme.Material3.DynamicColors.DayNight"
                    android:id="@+id/feature_toggle"
                    android:filterTouchesWhenObscured="false"
                    android:clickable="true"
                    android:focusable="true"
                    android:padding="8dp"
                    android:layout_height="48dp"
                    android:layout_width="wrap_content"
                    android:gravity="end|center_vertical"
                    android:layout_alignParentEnd="true"
                    style="@style/SettingslibSwitchStyle.Expressive"/>
        </RelativeLayout>
        <RelativeLayout
            android:id="@+id/bottom_buttons"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@*android:dimen/notification_2025_margin"
            android:minHeight="@dimen/notification_2025_guts_button_size"
            android:layout_gravity="center_vertical"
            android:theme="@style/Theme.SystemUI.Dialog"
            >
            <Button
                android:id="@+id/inline_dismiss"
                android:text="@string/notification_inline_dismiss"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:gravity="center"
                android:minWidth="@dimen/notification_2025_min_tap_target_size"
                android:minHeight="@dimen/notification_2025_min_tap_target_size"
                android:maxWidth="200dp"
                android:layout_marginEnd="8dp"
                style="@style/Widget.Dialog.Button.BorderButton"
                />
            <Button
                android:id="@+id/turn_off_notifications"
                android:text="@string/inline_turn_off_notifications"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toEndOf="@id/inline_dismiss"
                android:gravity="center"
                android:minWidth="@dimen/notification_2025_min_tap_target_size"
                android:minHeight="@dimen/notification_2025_min_tap_target_size"
                android:maxWidth="200dp"
                style="@style/Widget.Dialog.Button.BorderButton"
                />
            <Button
                android:id="@+id/done"
                android:text="@string/inline_done_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:gravity="center"
                android:minWidth="@dimen/notification_2025_min_tap_target_size"
                android:minHeight="@dimen/notification_2025_min_tap_target_size"
                android:maxWidth="125dp"
                style="@style/Widget.Dialog.Button"
                />
        </RelativeLayout>
    </LinearLayout>
</com.android.systemui.statusbar.notification.row.BundledNotificationInfo>
