/** * `ProjectLauncher` — the empty-state screen shown when no project tab is open. * * Renders the project creation form and the known-projects list centred in the * available space. All behaviour comes from the `vm` prop (a `useProjects` * view-model slice); no hooks called here — presentation only. */ import type { Project } from "@/domain"; import { Button, Input, Panel } from "@/shared"; export interface ProjectLauncherProps { /** Form field values */ name: string; root: string; onNameChange: (v: string) => void; onRootChange: (v: string) => void; onSubmit: (e: React.FormEvent) => void; canCreate: boolean; busy: boolean; onRefresh: () => void; projects: Project[]; onOpen: (id: string) => void; error?: string | null; } export function ProjectLauncher({ name, root, onNameChange, onRootChange, onSubmit, canCreate, busy, onRefresh, projects, onOpen, error, }: ProjectLauncherProps) { return (
{error}
)}No projects yet.
) : ({p.root}