import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useEditContext } from "./client/editContext";
import { ActiveUsers } from "./menubar/ActiveUsers";
import { ItemLanguageVersion } from "./menubar/ItemLanguageVersion";
import { WorkflowButton } from "./menubar/WorkflowButton";
/**
 * Titlebar content for workspaces - renders inline within GlobalMenuBar
 * Contains the item selector; mobile also keeps compact collaboration controls.
 */
export function Titlebar() {
    const editContext = useEditContext();
    if (!editContext?.workspace)
        return null;
    const content = (_jsx("div", { className: "flex h-full max-h-full min-h-0 min-w-0 flex-1 items-center overflow-hidden", "data-testid": "editor-titlebar", children: _jsx(ItemLanguageVersion, {}) }));
    if (editContext.isMobile) {
        return (_jsxs("div", { className: "flex flex-row items-center border-b px-1.5 py-1 md:p-0", "data-testid": "editor-titlebar", children: [_jsx(ItemLanguageVersion, {}), _jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-1", "data-testid": "editor-titlebar-right", children: [editContext.workspaceId === "editor" && _jsx(WorkflowButton, {}), _jsx(ActiveUsers, {})] })] }));
    }
    return content;
}
//# sourceMappingURL=Titlebar.js.map