using Gtk 4.0;
using Adw 1;

Adw.ActionRow _root {
  use-markup: false;
  title-lines: 1;
  subtitle-lines: 2;
  activatable-widget: _filterCheckButton;
  
  [prefix]
  Gtk.Overlay _filterOverlay {
    valign: center;

    child: Gtk.Image _filterCheckBackground {
      halign: fill;
      valign: fill;
      overflow: hidden;
      margin-top: 2;
      margin-start: 2;
      margin-end: 2;
      margin-bottom: 2;

      styles ["group-filter-bg"]
    };

    [overlay]
    Gtk.CheckButton _filterCheckButton {
      valign: center;
      
      styles ["selection-mode", "group-filter-check"]
    }
  }
  
  [suffix]
  Gtk.Box {
    orientation: horizontal;
    valign: center;
    margin-top: 4;
    spacing: 6;
    
    Gtk.Label _amountLabel {
      halign: end;
      valign: center;
      margin-end: 6;
      visible: bind _filterCheckButton.active;
    }

    Gtk.Button _editButton {
      icon-name: "document-edit-symbolic";
      valign: center;
      tooltip-text: _("Edit Group");

      styles ["flat"]
    }
  }
}