import { memo, type ReactNode } from "react"; import { cn } from "@/components/lib/utils.js"; export const DesktopWindowFrame = memo(function DesktopWindowFrameComponent({ title: _title, children, actions: _actions, tabBar: _tabBar, isDesktop = false, isMacDesktop = false, isWindowsDesktop = false, headerTestId: _headerTestId, showHeader: _showHeader = isDesktop, }: { title: string; children: ReactNode; topBar?: ReactNode; actions?: ReactNode; /** 标签栏插槽,渲染在 header 内标题后面 */ tabBar?: ReactNode; isDesktop?: boolean; isMacDesktop?: boolean; isWindowsDesktop?: boolean; headerTestId?: string; showHeader?: boolean; }) { const isLinuxDesktop = isDesktop && !isMacDesktop && !isWindowsDesktop; const usesOpaqueRootSurface = !isDesktop || isWindowsDesktop || isLinuxDesktop; return (
{children}
); });