import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { SquarePen } from "lucide-react";
import { SimpleIconButton } from "../editor/ui/SimpleIconButton";
import { useEditContext } from "../editor/client/editContext";
import { ItemLanguageVersion } from "../editor/menubar/ItemLanguageVersion";
import { cn } from "../lib/utils";
/**
 * AgentsTitlebar - Titlebar content for the Agents workspace
 * Contains a toggle button for showing/hiding the editor preview panel
 * When editor is visible, also shows the page/language/version selector
 */
export function AgentsTitlebar() {
    const editContext = useEditContext();
    if (!editContext?.workspace)
        return null;
    const { showAgentsWorkspaceEditor, setShowAgentsWorkspaceEditor } = editContext;
    return (_jsxs("div", { className: cn("flex w-full flex-row items-center", editContext.isMobile && "border-b px-1.5 py-1"), children: [showAgentsWorkspaceEditor && _jsx(ItemLanguageVersion, {}), _jsx("div", { className: "flex-1" }), !editContext.isMobile && (_jsx("div", { className: "flex items-center gap-2", children: _jsx(SimpleIconButton, { icon: _jsx(SquarePen, { className: "h-5 w-5", strokeWidth: 1 }), label: showAgentsWorkspaceEditor ? "Hide Editor" : "Show Editor", size: "large", "data-testid": "editor-panel-toggle", selected: showAgentsWorkspaceEditor, onClick: () => setShowAgentsWorkspaceEditor(!showAgentsWorkspaceEditor) }) }))] }));
}
//# sourceMappingURL=AgentsTitlebar.js.map