using Gtk 4.0;
using Adw 1;

Gtk.ScrolledWindow _root {
  hscrollbar-policy: never;
  vexpand: true;

  Gtk.Box {
    orientation: vertical;
    spacing: 12;

    Gtk.Label {
      label: _("All Accounts");
      halign: start;
      margin-top: 12;
      margin-start: 12;

      styles ["heading"]
    }

    Gtk.FlowBox {
      homogeneous: true;
      max-children-per-line: 3;
      column-spacing: 10;
      row-spacing: 10;
      margin-start: 10;
      margin-end: 10;
      halign: fill;
      valign: start;
      selection-mode: none;

      Adw.ActionRow _incomeRow {
        title: _("Income");

        [suffix]
        Gtk.Label _incomeSuffix {
          valign: center;
          justify: right;

          styles ["denaro-income"]
        }

        styles ["card"]
      }

      Adw.ActionRow _expenseRow {
        title: _("Expense");

        [suffix]
        Gtk.Label _expenseSuffix {
          valign: center;
          justify: right;

          styles ["denaro-expense"]
        }

        styles ["card"]
      }

      Adw.ActionRow _totalRow {
        title: _("Total");

        [suffix]
        Gtk.Label _totalSuffix {
          valign: center;
          justify: right;

          styles ["denaro-total"]
        }

        styles ["card"]
      }
    }

    Gtk.Label {
      label: _("Groups");
      halign: start;
      margin-top: 12;
      margin-start: 12;

      styles ["heading"]
    }

    Gtk.FlowBox _groupsFlowbox {
      homogeneous: true;
      column-spacing: 10;
      row-spacing: 10;
      margin-start: 10;
      margin-end: 10;
      halign: fill;
      valign: start;
      selection-mode: none;
    }
  }
}