import { App, Astal, Gdk, Gtk } from "astal/gtk3";
import Clock from "./Clock";
import Workspaces from "./Workspaces";
import Systray from "./Systray";

export default function RightBar(gdkmonitor: Gdk.Monitor) {
    const { TOP, LEFT, RIGHT } = Astal.WindowAnchor;

    return <window
        className="RightBar Bar"
        gdkmonitor={gdkmonitor}
        exclusivity={Astal.Exclusivity.EXCLUSIVE}
        anchor={TOP | LEFT | RIGHT}
        application={App}>
        <centerbox>
            <box halign={Gtk.Align.START}>
                <Clock iconSide="left" />
            </box>
            <box halign={Gtk.Align.CENTER}>
                <Workspaces monitor="HDMI-A-1" iconSide="left" />
            </box>
            <box halign={Gtk.Align.END}>
                <Systray iconSide="left" />
            </box>
        </centerbox>
    </window>
}
