import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { Minimize2, Monitor, Smartphone } from "lucide-react";
import { useEditContext } from "../editContext";
export function FullscreenControls(props) {
    const { device, setDevice, canExit, onExit, firstMobileDeviceName } = props;
    const editContext = useEditContext();
    const buttonBaseClass = `
    relative flex items-center justify-center
    h-8 w-8 rounded-lg
    text-white/60
    transition-all duration-200 ease-out
    hover:text-white hover:bg-white/10
    active:scale-90
    cursor-pointer
  `;
    return (_jsxs("div", { className: "bg-neutral-grey-100/20 hover:bg-neutral-grey-100/40 fixed top-4 right-4 z-[9999] flex items-center gap-0.5 rounded-xl border border-white/5 p-0.5 shadow-lg backdrop-blur-md transition-all duration-300 hover:border-white/10", children: [!editContext?.isMobile && (_jsx("button", { onClick: () => {
                    const currentDevice = device;
                    if (currentDevice === "desktop") {
                        if (firstMobileDeviceName) {
                            setDevice(firstMobileDeviceName);
                        }
                    }
                    else {
                        setDevice("desktop");
                    }
                }, className: buttonBaseClass, "aria-label": device === "desktop"
                    ? "Switch to mobile view"
                    : "Switch to desktop view", title: device === "desktop"
                    ? "Switch to mobile view"
                    : "Switch to desktop view", "data-testid": "fullscreen-device-toggle", children: device === "desktop" ? (_jsx(Smartphone, { className: "h-4 w-4", strokeWidth: 1.5 })) : (_jsx(Monitor, { className: "h-4 w-4", strokeWidth: 1.5 })) })), canExit && (_jsxs(_Fragment, { children: [!editContext?.isMobile && (_jsx("div", { className: "mx-0.5 h-4 w-px bg-white/5" })), _jsx("button", { onClick: onExit, className: buttonBaseClass, "aria-label": "Exit fullscreen", title: "Exit fullscreen (Ctrl+F11)", "data-testid": "fullscreen-exit-button", children: _jsx(Minimize2, { className: "h-4 w-4", strokeWidth: 1.5 }) })] }))] }));
}
//# sourceMappingURL=FullscreenControls.js.map