{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "feature22",
  "title": "Setup Checklist with Progress Sidebar",
  "description": "Multi-step checklist with status indicators, ETAs, and a sticky sidebar showing completion progress and key stats. Perfect for onboarding flows, implementation guides, or setup wizards.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [
    "badge",
    "button",
    "progress"
  ],
  "files": [
    {
      "path": "registry/feature22/feature22.tsx",
      "content": "\"use client\";\n\nimport {\n  Activity,\n  Check,\n  Circle,\n  Loader2,\n  Plug,\n  ShieldCheck,\n  Wand2,\n} from \"lucide-react\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport Link from \"next/link\";\nimport { Progress } from \"@/components/ui/progress\";\nimport { cn } from \"@/lib/utils\";\nimport { useMemo } from \"react\";\n\ntype StepStatus = \"done\" | \"in_progress\" | \"todo\";\n\ninterface Step {\n  id: string;\n  icon?: React.ReactNode;\n  title: string;\n  description?: string;\n  eta?: string;\n  status?: StepStatus;\n  href?: string;\n}\n\ninterface Stat {\n  id: string;\n  label: string;\n  value: string;\n  description?: string;\n}\n\ninterface ButtonItem {\n  id: string;\n  label: string;\n  href?: string;\n  variant?:\n    | \"default\"\n    | \"secondary\"\n    | \"outline\"\n    | \"ghost\"\n    | \"link\"\n    | \"destructive\";\n}\n\ninterface Feature22Props {\n  badge?: {\n    label: string;\n    variant?: \"default\" | \"secondary\" | \"outline\";\n  };\n  heading?: string;\n  description?: string;\n  progressLabel?: string;\n  stepsCompletedLabel?: string;\n  steps?: Step[];\n  stats?: Stat[];\n  buttons?: ButtonItem[];\n  className?: string;\n}\n\nexport const feature22Demo: Feature22Props = {\n  badge: { label: \"Setup\", variant: \"secondary\" },\n  heading: \"Launch-ready in a single afternoon\",\n  description:\n    \"A pragmatic checklist that keeps your rollout predictable: configure essentials, validate data, and go live with confidence.\",\n  progressLabel: \"Implementation progress\",\n  stepsCompletedLabel: \"steps completed\",\n  steps: [\n    {\n      id: \"step-1\",\n      icon: <Plug className=\"size-6 md:size-8\" />,\n      title: \"Connect your data sources\",\n      description:\n        \"Authenticate and validate read permissions. We'll auto-detect schemas and suggest sane defaults.\",\n      eta: \"5–10 min\",\n      status: \"done\",\n      href: \"https://beste.co\",\n    },\n    {\n      id: \"step-2\",\n      icon: <ShieldCheck className=\"size-6 md:size-8\" />,\n      title: \"Configure roles & access\",\n      description:\n        \"Define who can view, edit, and publish. Invite teammates and set approval rules.\",\n      eta: \"10–15 min\",\n      status: \"in_progress\",\n    },\n    {\n      id: \"step-3\",\n      icon: <Wand2 className=\"size-6 md:size-8\" />,\n      title: \"Apply templates & standards\",\n      description:\n        \"Start from curated templates and enforce consistent typography, spacing, and brand colors across pages.\",\n      eta: \"15–25 min\",\n      status: \"todo\",\n    },\n    {\n      id: \"step-4\",\n      icon: <Activity className=\"size-6 md:size-8\" />,\n      title: \"Enable monitoring\",\n      description:\n        \"Track uptime and core events. Set alerts for broken links, failed forms, and slow pages.\",\n      eta: \"10 min\",\n      status: \"todo\",\n      href: \"https://beste.co\",\n    },\n  ],\n  stats: [\n    {\n      id: \"stat-1\",\n      label: \"Avg. time to first publish\",\n      value: \"45 min\",\n      description: \"From blank page to deployed site\",\n    },\n    {\n      id: \"stat-2\",\n      label: \"Guardrails included\",\n      value: \"12 checks\",\n      description: \"Preflight validation before publish\",\n    },\n    {\n      id: \"stat-3\",\n      label: \"Rollback window\",\n      value: \"30 days\",\n      description: \"One-click restore for changes\",\n    },\n  ],\n  buttons: [\n    { id: \"btn-1\", label: \"Start a guided setup\", href: \"https://beste.co\" },\n  ],\n};\n\nconst StatusIcon = ({ status }: { status: StepStatus }) => {\n  switch (status) {\n    case \"done\":\n      return <Check size={14} />;\n    case \"in_progress\":\n      return <Loader2 size={14} className=\"animate-spin\" />;\n    default:\n      return <Circle size={14} />;\n  }\n};\n\nconst getStatusLabel = (status: StepStatus) => {\n  switch (status) {\n    case \"done\":\n      return \"Done\";\n    case \"in_progress\":\n      return \"In progress\";\n    default:\n      return \"Todo\";\n  }\n};\n\nexport function Feature22({\n  badge,\n  heading,\n  description,\n  progressLabel = \"Progress\",\n  stepsCompletedLabel = \"steps completed\",\n  steps = [],\n  stats = [],\n  buttons = [],\n  className,\n}: Feature22Props) {\n  const { doneCount, progressPercent } = useMemo(() => {\n    const done = steps.filter((s) => s.status === \"done\").length;\n    const total = steps.length;\n    const percent = total > 0 ? Math.round((done / total) * 100) : 0;\n    return { doneCount: done, progressPercent: percent };\n  }, [steps]);\n\n  if (steps.length === 0) return null;\n\n  return (\n    <section className={cn(\"py-16 md:py-24 w-full\", className)}>\n      <div className=\"mx-auto max-w-6xl px-4 md:px-6\">\n        <div className=\"grid gap-6 md:gap-8 lg:grid-cols-[1.35fr_0.65fr]\">\n          <div>\n            {(badge || heading || description) && (\n              <div className=\"mb-10 flex flex-col gap-4\">\n                {badge && (\n                  <Badge variant={badge.variant ?? \"default\"} className=\"w-fit\">\n                    {badge.label}\n                  </Badge>\n                )}\n\n                {heading && (\n                  <h2 className=\"text-3xl font-semibold md:text-5xl\">\n                    {heading}\n                  </h2>\n                )}\n\n                {description && (\n                  <p className=\"max-w-2xl text-base md:text-lg text-muted-foreground\">\n                    {description}\n                  </p>\n                )}\n              </div>\n            )}\n\n            <div className=\"space-y-3\">\n              {steps.map((step) => {\n                const status = step.status || \"todo\";\n                const content = (\n                  <div className=\"rounded-lg border bg-muted p-5 md:p-6 transition-colors\">\n                    <div className=\"flex items-start justify-between gap-4\">\n                      <div className=\"flex items-start gap-3\">\n                        <div className=\"shrink-0\">{step.icon}</div>\n                        <div className=\"min-w-0\">\n                          <div className=\"flex flex-wrap items-center gap-2\">\n                            <h3 className=\"text-base font-semibold md:text-lg\">\n                              {step.title}\n                            </h3>\n                            {step.eta && (\n                              <span className=\"text-xs text-muted-foreground\">\n                                {step.eta}\n                              </span>\n                            )}\n                          </div>\n                        </div>\n                      </div>\n                      <div className=\"shrink-0\">\n                        <span className=\"inline-flex items-center gap-1 rounded-lg border px-2 py-1 text-xs text-muted-foreground\">\n                          <StatusIcon status={status} />\n                          {getStatusLabel(status)}\n                        </span>\n                      </div>\n                    </div>\n                    {step.description && (\n                      <div className=\"mt-2 text-sm md:text-base ml-9 md:ml-11 text-muted-foreground\">\n                        {step.description}\n                      </div>\n                    )}\n                  </div>\n                );\n\n                if (step.href) {\n                  return (\n                    <Link\n                      key={step.id}\n                      href={step.href}\n                      className=\"block hover:opacity-80\"\n                    >\n                      {content}\n                    </Link>\n                  );\n                }\n\n                return <div key={step.id}>{content}</div>;\n              })}\n            </div>\n          </div>\n\n          <aside className=\"lg:sticky lg:top-6 h-fit rounded-lg border bg-muted p-4 md:p-6\">\n            <div className=\"flex items-center justify-between gap-4\">\n              <div>\n                <p className=\"text-sm font-medium\">{progressLabel}</p>\n                <p className=\"text-xs text-muted-foreground\">\n                  {doneCount}/{steps.length} {stepsCompletedLabel}\n                </p>\n              </div>\n              <div className=\"text-sm font-semibold\">{progressPercent}%</div>\n            </div>\n\n            <div className=\"mt-3\">\n              <Progress value={progressPercent} />\n            </div>\n\n            {stats.length > 0 && (\n              <div className=\"mt-6 space-y-3\">\n                {stats.map((stat) => (\n                  <div\n                    key={stat.id}\n                    className=\"flex items-start justify-between gap-3 rounded-lg bg-background px-4 py-3\"\n                  >\n                    <div className=\"min-w-0\">\n                      <p className=\"text-xs font-medium\">{stat.label}</p>\n                      {stat.description && (\n                        <p className=\"mt-1 text-xs text-muted-foreground\">\n                          {stat.description}\n                        </p>\n                      )}\n                    </div>\n                    <p className=\"shrink-0 text-sm font-semibold\">\n                      {stat.value}\n                    </p>\n                  </div>\n                ))}\n              </div>\n            )}\n\n            {buttons.length > 0 && (\n              <div className=\"mt-6 flex flex-col gap-2\">\n                {buttons.map((button) => (\n                  <Button\n                    key={button.id}\n                    variant={button.variant ?? \"default\"}\n                    asChild\n                    className=\"w-full\"\n                  >\n                    <Link href={button.href ?? \"#\"}>{button.label}</Link>\n                  </Button>\n                ))}\n              </div>\n            )}\n          </aside>\n        </div>\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/feature22.tsx"
    }
  ],
  "type": "registry:block"
}