import { Astal, Gtk, Gdk } from "ags/gtk3";
import app from "ags/gtk3/app";
import Launcher from "./components/Launcher";
import Workspace from "./components/Workspaces";
import Hidden from "./components/Hidden";

export default (monitor: Gdk.Monitor) => (
  <window
    visible
    class="root"
    gdkmonitor={monitor}
    exclusivity={Astal.Exclusivity.IGNORE}
    anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.LEFT}
    application={app}
  >
    <Hidden>
      <box class="widgets" hexpand halign={Gtk.Align.START}>
        <Launcher />
        <Workspace gdkmonitor={monitor} />
      </box>
    </Hidden>
  </window>
);
