import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { Dialog, DialogClose, DialogContent, DialogTrigger, } from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";
import { Maximize2, Minimize2 } from "lucide-react";
const defaultTrigger = (_jsx("div", { className: "absolute right-0 top-0 pb-10 pl-10 opacity-75 hover:opacity-100", children: _jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { size: "icon", children: _jsx(Maximize2, {}) }) }) }));
export const ConditionalFullscreen = ({ children, alwaysShowChildren = true, trigger = defaultTrigger }) => {
    return (_jsx(Dialog, { children: _jsxs("div", { className: "relative flex w-full grow justify-center", children: [alwaysShowChildren ? (_jsx("div", { className: "flex w-full bg-background text-primary", children: children })) : (_jsx(_Fragment, {})), trigger, _jsxs(DialogContent, { className: "flex h-5/6 w-11/12 grow bg-background text-primary sm:h-3/4 sm:w-3/4", children: [children, _jsx(DialogClose, { className: "absolute right-0 top-0", asChild: true, children: _jsx("div", { className: "p-10 opacity-75 hover:opacity-100", children: _jsx(Button, { size: "icon", children: _jsx(Minimize2, {}) }) }) })] })] }) }));
};
