using Gtk 4.0;
using Adw 1;

template $GradiaMainWindow: Adw.ApplicationWindow {
  title: "Gradia";
  default-width: 975;
  default-height: 675;

  content: Adw.ToastOverlay toast_overlay {
    Adw.ToolbarView toolbar_view {
      top-bar-style: flat;

      content: Gtk.Stack main_stack {
        transition-type: crossfade;
        transition-duration: 200;

        Adw.Bin welcome_page {
          name: "welcome";

          child: Box welcome_content_placeholder {};
        }

        Gtk.StackPage main_page {
          name: "main";

          child: Adw.BreakpointBin breakpoint_bin {
            width-request: 200;
            height-request: 50;

            Adw.Breakpoint breakpoint {
              condition ("max-width: 695sp")

              setters {
                split_view.collapsed: true;
              }
            }

            child: Adw.OverlaySplitView split_view {
              collapsed: false;
              show-sidebar: true;
            };
          };
        }
      };
    }
  };
}

