{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "comparison-slide",
  "title": "Comparison Slide",
  "description": "A side-by-side comparison slide with columns or table variant.",
  "dependencies": [
    "@revealjs/react",
    "reveal.js"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/slidecn/ui/comparison-slide.tsx",
      "content": "\"use client\";\n\nimport { Slide } from \"@revealjs/react\";\nimport type { SlideProps } from \"@revealjs/react\";\nimport { cva } from \"class-variance-authority\";\nimport type { VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst comparisonSlideVariants = cva(\"h-full\", {\n  defaultVariants: {\n    variant: \"columns\",\n  },\n  variants: {\n    variant: {\n      columns: \"grid grid-cols-2 gap-6\",\n      table: \"\",\n    },\n  },\n});\n\nconst headerColorVariants: Record<string, string> = {\n  default: \"bg-muted text-foreground\",\n  green: \"bg-green-500/10 text-green-600 dark:text-green-400\",\n  red: \"bg-red-500/10 text-red-600 dark:text-red-400\",\n};\n\ninterface ComparisonColumn {\n  label: string;\n  items: string[];\n  color?: \"default\" | \"green\" | \"red\";\n}\n\ninterface ComparisonSlideProps\n  extends SlideProps, VariantProps<typeof comparisonSlideVariants> {\n  title?: string;\n  left: ComparisonColumn;\n  right: ComparisonColumn;\n  notes?: string;\n}\n\nconst ComparisonSlide = ({\n  title,\n  left,\n  right,\n  variant,\n  className,\n  notes,\n  ...slideProps\n}: ComparisonSlideProps) => {\n  if (variant === \"table\") {\n    return (\n      <Slide className={cn(className)} {...slideProps}>\n        <div className=\"flex h-full flex-col gap-6\">\n          {title && (\n            <h2 className=\"text-3xl font-bold tracking-tight\">{title}</h2>\n          )}\n          <table className=\"w-full border-collapse text-left\">\n            <thead>\n              <tr>\n                <th\n                  className={cn(\n                    \"rounded-tl-lg px-4 py-3 text-sm font-semibold\",\n                    headerColorVariants[left.color ?? \"default\"]\n                  )}\n                >\n                  {left.label}\n                </th>\n                <th\n                  className={cn(\n                    \"rounded-tr-lg px-4 py-3 text-sm font-semibold\",\n                    headerColorVariants[right.color ?? \"default\"]\n                  )}\n                >\n                  {right.label}\n                </th>\n              </tr>\n            </thead>\n            <tbody>\n              {Array.from({\n                length: Math.max(left.items.length, right.items.length),\n              }).map((_, i) => (\n                <tr key={i} className=\"border-b border-border odd:bg-muted/30\">\n                  <td className=\"px-4 py-2.5 text-sm\">{left.items[i] ?? \"\"}</td>\n                  <td className=\"px-4 py-2.5 text-sm\">\n                    {right.items[i] ?? \"\"}\n                  </td>\n                </tr>\n              ))}\n            </tbody>\n          </table>\n        </div>\n        {notes && <aside className=\"notes\">{notes}</aside>}\n      </Slide>\n    );\n  }\n\n  const renderColumn = (col: ComparisonColumn) => (\n    <div className=\"flex flex-col rounded-lg border\">\n      <div\n        className={cn(\n          \"rounded-t-lg px-4 py-3 text-sm font-semibold\",\n          headerColorVariants[col.color ?? \"default\"]\n        )}\n      >\n        {col.label}\n      </div>\n      <div className=\"flex flex-col gap-2 p-4\">\n        {col.items.map((item, i) => (\n          <div key={i} className=\"flex items-start gap-2 text-sm\">\n            <span className=\"mt-1.5 size-1.5 shrink-0 rounded-full bg-muted-foreground/30\" />\n            <span>{item}</span>\n          </div>\n        ))}\n      </div>\n    </div>\n  );\n\n  return (\n    <Slide className={cn(className)} {...slideProps}>\n      <div className=\"flex h-full flex-col gap-6\">\n        {title && (\n          <h2 className=\"text-3xl font-bold tracking-tight\">{title}</h2>\n        )}\n        <div className={cn(comparisonSlideVariants({ variant }))}>\n          {renderColumn(left)}\n          {renderColumn(right)}\n        </div>\n      </div>\n      {notes && <aside className=\"notes\">{notes}</aside>}\n    </Slide>\n  );\n};\n\nexport { ComparisonSlide, comparisonSlideVariants };\n",
      "type": "registry:ui",
      "target": "components/slides/comparison-slide.tsx"
    }
  ],
  "type": "registry:ui"
}