<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2026, Jiri Eischmann <jiri@eischmann.cz> and the meshy contributors -->
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
<interface>
  <requires lib="gtk" version="4.0"/>
  <requires lib="libadwaita" version="1.0"/>

  <!-- Backup & Restore -->
  <object class="AdwPreferencesGroup" id="backup_group">
    <property name="margin-start">12</property>
    <property name="margin-end">12</property>
    <property name="margin-top">8</property>
    <child>
      <object class="AdwActionRow" id="backup_row">
        <property name="title" translatable="yes">Backup</property>
        <property name="subtitle" translatable="yes">Save configuration and messages to a file</property>
        <property name="activatable-widget">backup_btn</property>
        <child type="suffix">
          <object class="GtkButton" id="backup_btn">
            <property name="icon-name">document-save-symbolic</property>
            <property name="valign">center</property>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="AdwActionRow" id="restore_row">
        <property name="title" translatable="yes">Restore</property>
        <property name="subtitle" translatable="yes">Restore from a backup file</property>
        <property name="activatable-widget">restore_btn</property>
        <child type="suffix">
          <object class="GtkButton" id="restore_btn">
            <property name="icon-name">document-open-symbolic</property>
            <property name="valign">center</property>
          </object>
        </child>
      </object>
    </child>
  </object>

  <!-- Spacer to push Factory Reset to the bottom -->
  <object class="GtkBox" id="spacer">
    <property name="vexpand">true</property>
  </object>

  <!-- Factory Reset -->
  <object class="AdwPreferencesGroup" id="reset_group">
    <property name="margin-start">12</property>
    <property name="margin-end">12</property>
    <property name="margin-bottom">12</property>
    <child>
      <object class="AdwActionRow" id="factory_reset_row">
        <property name="title" translatable="yes">Factory Reset</property>
        <property name="subtitle" translatable="yes">Erase all data on the companion</property>
        <property name="activatable-widget">factory_reset_btn</property>
        <child type="suffix">
          <object class="GtkButton" id="factory_reset_btn">
            <property name="icon-name">edit-clear-all-symbolic</property>
            <property name="valign">center</property>
            <style>
              <class name="destructive-action"/>
            </style>
          </object>
        </child>
      </object>
    </child>
  </object>
</interface>
