🏡 index : quine-global-labs/bazaar.git

using Gtk 4.0;
using Adw 1;

template $BzUserDataPage: Adw.NavigationPage {
  title: _("Manage Leftover User Data");

  Adw.ToolbarView {
    [top]
    Adw.HeaderBar {}

    content: Adw.ViewStack stack {
      enable-transitions: true;
      transition-duration: 400;

      Adw.ViewStackPage {
        name: "loading";

        child: Adw.Spinner {
          halign: fill;
          valign: center;
          width-request: 64;
          height-request: 64;
          margin-bottom: 18;
        };
      }

      Adw.ViewStackPage {
        name: "empty";

        child: Adw.StatusPage {
          icon-name: "user-trash-symbolic";
          title: _("No Leftover User Data Found");
          description: _("Personal data left behind by apps that were removed will show up here");
        };
      }

      Adw.ViewStackPage {
        name: "content";

        child: ScrolledWindow {
          hscrollbar-policy: never;

          child: Adw.ClampScrollable {
            maximum-size: 650;

            child: ListView list_view {
              styles [
                "navigation-sidebar",
                "user-data-list-view",
              ]

              overflow: visible;

              model: NoSelection {
                model: bind template.model;
              };

              factory: BuilderListItemFactory {
                template ListItem {
                  activatable: false;
                  selectable: false;
                  focusable: false;

                  child: $BzUserDataTile {
                    group: bind template.item as <$BzEntryGroup>;
                  };
                }
              };
            };
          };
        };
      }
    };
  }
}