import { CheckCircle2 } from "lucide-react";
import { LinkButton } from "@/components/ui/LinkButton";

export interface SuccessStateProps {
  title: string;
  description?: string;
  actionLabel?: string;
  actionHref?: string;
}

/** Confirmation copy states a real next step and timeframe, never a vague "we'll be in touch" (Sprint 2 §13). */
export function SuccessState({ title, description, actionLabel, actionHref }: SuccessStateProps) {
  return (
    <div className="flex flex-col items-center gap-4 py-20 text-center" role="status">
      <CheckCircle2 className="size-10 text-success" aria-hidden="true" />
      <h2 className="font-display text-h2 font-normal text-ink">{title}</h2>
      {description && <p className="max-w-md text-body-md text-ink-soft">{description}</p>}
      {actionLabel && actionHref && (
        <LinkButton href={actionHref} variant="secondary" size="md" className="mt-2">
          {actionLabel}
        </LinkButton>
      )}
    </div>
  );
}
