<?xml version="1.0" encoding="UTF-8"?>
<interface domain="thinkpad-battery-threshold@marcosdalvarez.org">
    <template class="GeneralPrefs" parent="AdwPreferencesPage">
        <property name="name">general</property>
        <property name="title" translatable="yes">General</property>
        <property name="icon-name">preferences-other-symbolic</property>
        <child>
            <object class="AdwPreferencesGroup" id="ui_group">
                <property name="title" translatable="yes">User interface</property>
                <child>
                    <object class="AdwComboRow" id="indicator_mode">
                        <property name="title" translatable="yes">Show indicator</property>
                        <property name="subtitle" translatable="yes">Set when the Icon tray should appear in Gnome tray</property>
                        <property name="model">indicator_mode_model</property>
                    </object>
                </child>
                <child>
                    <object class="AdwSwitchRow" id="color_mode">
                        <property name="title" translatable="yes">Colored icons theme</property>
                        <property name="subtitle" translatable="yes">Activate colored icons</property>
                    </object>
                </child>
                <child>
                    <object class="AdwSwitchRow" id="show_values">
                        <property name="title" translatable="yes">Show values</property>
                        <property name="subtitle" translatable="yes">Show current thresholds values</property>
                    </object>
                </child>
                <child>
                    <object class="AdwSwitchRow" id="show_notifications">
                        <property name="title" translatable="yes">Show notifications</property>
                        <property name="subtitle" translatable="yes">Show actions notifications</property>
                    </object>
                </child>
            </object>
        </child>

        <child>
            <object class="AdwPreferencesGroup" id="reset_all_group">
                <property name="title" translatable="yes">Reset preferences</property>
                <property name="description" translatable="yes">Reset all extension preferences</property>
                <property name="header-suffix">
                    <object class="GtkButton" id="reset_all">
                        <property name="halign">start</property>
                        <property name="valign">center</property>
                        <property name="margin-start">6</property>
                        <child>
                            <object class="AdwButtonContent">
                                <property name="icon-name">view-refresh-symbolic</property>
                                <property name="label" translatable="yes">Reset</property>
                            </object>
                        </child>
                        <style>
                            <class name="destructive-action" />
                        </style>
                    </object>
                </property>
            </object>
        </child>
    </template>

    <object class="GtkStringList" id="indicator_mode_model">
        <items>
            <item translatable="yes">On active</item>
            <item translatable="yes">On inactive</item>
            <item translatable="yes">Always</item>
            <item translatable="yes">Never</item>
        </items>
    </object>

    <object class="AdwMessageDialog" id="reset_dialog">
        <property name="heading" translatable="yes">Reset all preferences?</property>
        <property name="body" translatable="yes">This action resets all extension settings to their recommended values (including thresholds), do you want to continue?</property>
        <property name="default-response">cancel</property>
        <property name="close-response">cancel</property>
        <property name="hide-on-close">true</property>
        <property name="modal">true</property>
        <property name="destroy-with-parent">true</property>
        <responses>
            <response id="cancel" translatable="yes" appearance="suggested">Cancel</response>
            <response id="reset" translatable="yes" appearance="destructive">Reset</response>
        </responses>
    </object>
</interface>