"use client" import type { ReactNode } from "react" import { usePlatform } from "@/hooks/use-platform" 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 rowPadding = cn( "px-3", isMac && "pl-[76px]", isWindows && showWindowControls && "pr-[138px]" ) return (
{left}
{right ? (
{right}
) : null}
{center ? (
{center}
) : null} {showWindowControls && isWindows ? (
) : null}
) }