using Gtk 4.0;

template $ThemeSwitcher : Box {
  hexpand: true;

  styles [
    "themeswitcher",
  ]

  Box box {
    hexpand: true;
    orientation: horizontal;
    spacing: 12;

    CheckButton system {
      visible: bind template.show-system;
      hexpand: true;
      halign: center;
      focus-on-click: false;
      tooltip-text: _("Follow System Style");

      notify::active => $_on_color_scheme_changed();

      styles [
        "theme-selector",
        "system",
      ]
    }

    CheckButton light {
      hexpand: true;
      halign: center;
      group: system;
      focus-on-click: false;
      tooltip-text: _("Light Style");

      notify::active => $_on_color_scheme_changed();

      styles [
        "theme-selector",
        "light",
      ]
    }

    CheckButton dark {
      hexpand: true;
      halign: center;
      group: system;
      focus-on-click: false;
      tooltip-text: _("Dark Style");

      notify::active => $_on_color_scheme_changed();

      styles [
        "theme-selector",
        "dark",
      ]
    }
  }
}
