import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Maximize, Minus, X } from "lucide-react";
import { Button, buttonVariants } from "./cmp/button";
import { cn } from "./lib/utils";
export default function Controls({ className, notPresentClassName, }) {
    // @ts-expect-error variable only available in electron
    const actuallyShow = window.tensaminShowWindowControls ?? false;
    if (!actuallyShow || false)
        return _jsx("div", { className: notPresentClassName });
    // @ts-expect-error functions only available in electron
    const minimize = window.tensaminDesktop.window.minimize();
    // @ts-expect-error functions only available in electron
    const maximize = window.tensaminDesktop.window.maximize();
    // @ts-expect-error functions only available in electron
    const close = window.tensaminDesktop.window.close();
    return (_jsx("div", { className: cn(buttonVariants({ variant: "outline" })
            .replace("px-2.5", "px-0.5")
            .replace("gap-1.5", "gap-0.5"), "flex flex-row h-9", className), children: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "ghost", className: "w-9 h-9 aspect-square rounded-lg", onClick: () => minimize(), children: _jsx(Minus, {}) }), _jsx(Button, { variant: "ghost", className: "w-9 h-9 aspect-square rounded-lg", onClick: () => maximize(), children: _jsx(Maximize, {}) }), _jsx(Button, { variant: "ghost", className: "w-9 h-9 aspect-square rounded-lg", onClick: () => close(), children: _jsx(X, {}) })] }) }));
}
