import { ChevronDown, Redo2, Save, Search, Share2, Undo2 } from "lucide-react"; import type { MouseEvent, ReactNode } from "react"; import type { QOfficeCommand } from "../hooks/useQOfficeCommand"; import type { AppId } from "../types"; interface AppShellProps { activeApp: AppId; windowTitle?: string; status: { savedLabel: string; updatedAt?: string; content?: ReactNode; trailing?: ReactNode; className?: string; }; children: ReactNode; } const appTitles: Record = { word: "Документ1 - QWord", sheets: "Книга1 - QExcell", slides: "Презентация1 - QPowerPoint", mail: "Почта - QOutlook" }; function dispatchQOfficeCommand(command: QOfficeCommand) { window.dispatchEvent(new CustomEvent("qoffice-command", { detail: { command } })); } function keepActiveEditorFocus(event: MouseEvent) { event.preventDefault(); } export function AppShell({ activeApp, windowTitle, status, children }: AppShellProps) { const statusClassName = ["statusbar", status.className].filter(Boolean).join(" "); const displayWindowTitle = windowTitle?.trim() || appTitles[activeApp]; return (
{displayWindowTitle}
{children}
); }