import { Astal, Gtk } from "ags/gtk3";
import app from "ags/gtk3/app";
import Gdk from "gi://Gdk";
import Systray from "./components/Tray";
import Hidden from "./components/Hidden";
import Battery from "./components/Battery";

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