<!--
    Created by Angel Leon (@gubatron), Alden Torres (aldenml), Marcelina Knitter (@marcelinkaaa)
    Copyright (c) 2011-2026, FrostWire(R). All rights reserved.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/default_dialog_background"
    android:orientation="vertical"
    android:scrollbars="vertical">

    <TextView
        android:id="@+id/dialog_confirm_list_title"
        style="@style/DefaultDialogTheme.TitleBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <TextView
        android:id="@+id/dialog_confirm_list_text"
        style="@style/DefaultDialogTheme.MainText"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <View
        style="@style/divider_line"
        android:layout_width="match_parent"
        android:layout_height="1dp" />

        <CheckBox
            android:id="@+id/dialog_confirm_list_select_all_checkbox"
            style="@style/DefaultDialogTheme.SmallTextMedium"
            android:background="@color/basic_gray_light"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="true"
            android:gravity="start|center_vertical"
            android:padding="8dp"
            android:text="@string/select_all" />

    <View
        style="@style/divider_line"
        android:layout_width="match_parent"
        android:layout_height="1dp" />

    <ListView
        android:id="@+id/dialog_confirm_list_listview"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:fastScrollEnabled="true" />

    <!-- summary of what was selected, only visible for selection mode in [multiple choice, no-choice] -->

    <View
        style="@style/divider_line"
        android:layout_width="match_parent"
        android:layout_height="1dp" />

    <LinearLayout
        android:id="@+id/dialog_confirm_list_selection_summary"
        android:background="@color/basic_gray_light"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="8dp"
        android:paddingLeft="12dp"
        android:paddingRight="12dp"
        android:paddingTop="8dp">

        <!-- the number of selected items -->
        <TextView
            android:id="@+id/dialog_confirm_list_num_checked_textview"
            style="@style/DefaultDialogTheme.SmallTextMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight=".5" />

        <!-- selection sum, e.g. for files, this would be the number of total bytes -->
        <TextView
            android:id="@+id/dialog_confirm_list_sum_checked_textview"
            style="@style/DefaultDialogTheme.SmallText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight=".5"
            android:gravity="end" />
    </LinearLayout>

    <View
        style="@style/divider_line"
        android:layout_width="match_parent"
        android:layout_height="1dp" />

    <!-- buttons -->
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="5dp"
        android:paddingTop="5dp">

        <Button
            android:id="@+id/dialog_confirm_list_button_no"
            style="@style/DefaultDialogTheme.Buttons"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toStartOf="@+id/dialog_confirm_list_button_yes"
            android:background="@drawable/default_dialog_background"
            android:text="@android:string/cancel" />

        <Button
            android:id="@+id/dialog_confirm_list_button_yes"
            style="@style/DefaultDialogTheme.Buttons"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:background="@drawable/default_dialog_background"
            android:text="@android:string/ok" />
    </RelativeLayout>

</LinearLayout>
