import { App, Astal, Gdk, Gtk } from "astal/gtk3";
import Clock from "./Clock";
import Date from "./Date";
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} spacing={8}>
                <Clock iconSide="left" />
                <Date iconSide="left" />
            </box>
            <box halign={Gtk.Align.CENTER} spacing={8}>
                <Workspaces monitor="HDMI-A-1" iconSide="left" />
            </box>
            <box halign={Gtk.Align.END} spacing={8}>
                <Systray iconSide="left" />
            </box>
        </centerbox>
    </window>
}
