import type { Ref } from "react"; import { AppLogo } from "@/pages/apps/AppLogo"; import { UnverifiedServerBadge } from "@/pages/apps/UnverifiedServerBadge"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; export function StepHeader({ title, headingRef, subtitle, step, activeIndex, labels, appIdentity, unverifiedHost, onCancel, }: { title?: string; headingRef?: Ref; subtitle?: string; step: string; activeIndex: number; labels: string[]; appIdentity?: { name: string; logoUrl: string | null; darkLogoUrl?: string | null }; /** * Host of an unknown remote MCP server. Present for the whole generic flow so * the operator can see whose server they are configuring at every step, not * just on the screen where they pasted the address. */ unverifiedHost?: string | null; onCancel?: () => void; }) { return (
{appIdentity ? ( ) : null}

{title ?? (appIdentity ? `Connect ${appIdentity.name}` : "Connect your own MCP server")}

{subtitle &&

{subtitle}

} {unverifiedHost ? : null}
{onCancel && }
{step !== "gallery" && labels.length > 1 && ( // A landmark with stable hooks, so the step model can be read without // guessing at Tailwind classes. The dots are decoration — the label // line below already says the same thing, so announcing both would // read every step name twice. )}
); }