import { Astal, Gdk, Gtk } from "astal/gtk3";
import Hyprland from "./modules/Hyprland";
import Calendar from "./modules/Calendar";
import QuickView from "./modules/QuickView";

const Bar = (gdkmonitor: Gdk.Monitor) => {
    const { TOP, LEFT, RIGHT } = Astal.WindowAnchor;

    return (
        <window gdkmonitor={gdkmonitor}
            cssClasses={["Bar"]}
            exclusivity={Astal.Exclusivity.EXCLUSIVE}
            anchor={TOP | LEFT | RIGHT}>
            <box orientation={Gtk.Orientation.HORIZONTAL} spacing={10}>
                <box hexpand halign={Gtk.Align.START}>
                    <Calendar.Time />
                    <Hyprland.Workspace />
                </box>
                <Hyprland.ActiveWindow />
                <box hexpand halign={Gtk.Align.END}>
                    <Hyprland.SysTray />
                    <QuickView.QuickView />
                </box>
            </box>
        </window>
    );
}

const cliHandler = ( args: string[] ): string => {
    return 'Not implemented';
}

export default {
    Bar,
    cliHandler
};
