"use client" import type { ReactNode } from "react" import { usePlatform } from "@/hooks/use-platform" import { useIsMobile } from "@/hooks/use-mobile" import { cn } from "@/lib/utils" import { WindowControls } from "./window-controls" interface AppTitleBarProps { left?: ReactNode center?: ReactNode right?: ReactNode className?: string rowClassName?: string centerInteractive?: boolean showWindowControls?: boolean } export function AppTitleBar({ left, center, right, className, rowClassName, centerInteractive = false, showWindowControls = true, }: AppTitleBarProps) { const { isMac, isWindows } = usePlatform() const isMobile = useIsMobile() const isDesktopRuntime = typeof window !== "undefined" && "__TAURI_INTERNALS__" in window const hasDesktopWindowChrome = showWindowControls && isDesktopRuntime const rowPadding = cn( "px-3", isMac && hasDesktopWindowChrome && "pl-[92px]", isWindows && hasDesktopWindowChrome && "pr-[138px]" ) return (