import { Settings } from "lucide-react"; import { Button } from "@/components/ui/button"; import { BackButton } from "@/components/ui/back-button"; import { useSettingsDialog } from "@/hooks/useSettingsDialog"; import { useTheme } from "@/hooks/useTheme"; import type { ReactNode } from "react"; interface HeaderProps { title: string; backTo?: string; action?: ReactNode; } export function Header({ title, backTo, action }: HeaderProps) { const { open: openSettings } = useSettingsDialog(); const theme = useTheme(); return (
{backTo && }
{title === "OpenCode" ? ( OpenCode ) : (

{title}

)}
{action &&
{action}
}
); }