"use client"; import { CheckCircle2 } from "lucide-react"; import { type ReactNode } from "react"; import { cx } from "../lib/utils"; import { OnboardingButton } from "../primitives/onboarding-button"; import { OnboardingCard } from "../primitives/onboarding-card"; export interface NextStep { /** Title of the next step */ title: string; /** Description of what this step involves */ description?: string; /** Icon to display (ReactNode) */ icon?: ReactNode; /** Action button text */ actionText?: string; /** Action to perform when clicked */ onAction?: () => void; /** Whether this step is optional */ optional?: boolean; } export interface SuccessStepProps { /** Title displayed at the top */ title?: string; /** Main success message */ message?: string; /** Optional icon to display (defaults to CheckCircle2) */ icon?: ReactNode; /** Array of next steps to display */ nextSteps?: NextStep[]; /** Primary action button */ primaryAction?: { text: string; onClick: () => void; }; /** Secondary action button */ secondaryAction?: { text: string; onClick: () => void; }; } export function SuccessStep({ title = "You're all set!", message = "Your setup is complete. Here's what you can do next.", icon, nextSteps = [], primaryAction, secondaryAction, }: SuccessStepProps) { return (
{icon || }

{title}

{message}

{nextSteps.length > 0 && (

Next steps

{nextSteps.map((step, index) => ( {step.icon && (
{step.icon}
)}
{step.title} {step.optional && ( (optional) )}
{step.description && (

{step.description}

)}
{step.actionText && step.onAction && ( {step.actionText} )}
))}
)} {(primaryAction || secondaryAction) && (
{secondaryAction && ( {secondaryAction.text} )} {primaryAction && ( {primaryAction.text} )}
)}
); }