/** * `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 && (

{error}

)}

New project

onNameChange(e.target.value)} className="w-48" /> onRootChange(e.target.value)} className="min-w-80 flex-1" />
{projects.length === 0 ? (

No projects yet.

) : (
    {projects.map((p) => (
  • {p.name} {p.root}
  • ))}
)}
); }