import { App, Astal, Gtk, Gdk } from "astal/gtk3";
import Launcher from "./components/Launcher";
import Workspace from "./components/Workspaces";
import Hidden from "./components/Hidden";
import { getHyprlandMonitor } from "../lib";

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