{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ds-pricing-card",
  "title": "Pricing Card",
  "description": "Card de plano com preço, badge popular, features e CTA — átomo base pricing.",
  "dependencies": [
    "class-variance-authority",
    "lucide-react"
  ],
  "registryDependencies": [
    "@lema-ds/badge",
    "@lema-ds/button",
    "@lema-ds/skeleton",
    "@lema-ds/ui-i18n",
    "@lema-ds/ds-locale-provider",
    "@lema-ds/tokens"
  ],
  "files": [
    {
      "path": "components/ds/ds-pricing-card.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { CheckIcon, XIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { UI_I18N, type UILocale } from \"@/lib/ui-i18n\"\nimport { useUILocale } from \"@/components/ui/ds-locale-provider\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Button } from \"@/components/ui/button\"\nimport { Skeleton } from \"@/components/ui/skeleton\"\n\n// ── Types ──────────────────────────────────────────────────────────────────\n\nexport interface PricingFeature {\n  label: string\n  included: boolean\n  tooltip?: string\n}\n\nexport interface PricingCardProps\n  extends\n    React.HTMLAttributes<HTMLDivElement>,\n    VariantProps<typeof pricingCardVariants> {\n  name: string\n  description?: string\n  price: number\n  originalPrice?: number\n  period?: \"month\" | \"year\" | \"lifetime\"\n  currency?: string\n  badge?: string\n  features?: PricingFeature[]\n  action?: { label: string; href?: string; onClick?: () => void }\n  locale?: UILocale\n  loading?: boolean\n}\n\n// ── Variants ───────────────────────────────────────────────────────────────\n\nexport const pricingCardVariants = cva(\n  \"flex flex-col gap-6 rounded-3xl border bg-card p-6 text-card-foreground transition-all\",\n  {\n    variants: {\n      featured: {\n        true: \"scale-[1.02] border-primary/20 bg-card shadow-xl\",\n        false: \"border-border\",\n      },\n      size: {\n        sm: \"gap-4 p-4\",\n        md: \"gap-6 p-6\",\n      },\n    },\n    defaultVariants: { featured: false, size: \"md\" },\n  }\n)\n\n// ── Component ──────────────────────────────────────────────────────────────\n\nexport function PricingCard({\n  className,\n  name,\n  description,\n  price,\n  originalPrice,\n  period = \"month\",\n  currency = \"$\",\n  badge,\n  featured = false,\n  features = [],\n  action,\n  locale: localeProp,\n  size = \"md\",\n  loading = false,\n  ...props\n}: PricingCardProps) {\n  const locale = useUILocale(localeProp)\n  if (loading) {\n    return (\n      <div\n        data-slot=\"pricing-card-skeleton\"\n        className={cn(pricingCardVariants({ featured, size }), className)}\n        {...props}\n      >\n        <Skeleton className=\"h-5 w-20\" />\n        <Skeleton className=\"h-4 w-full\" />\n        <Skeleton className=\"h-8 w-24\" />\n        <div className=\"flex flex-col gap-2\">\n          {Array.from({ length: 4 }).map((_, i) => (\n            <Skeleton key={i} className=\"h-3 w-full\" />\n          ))}\n        </div>\n        <Skeleton className=\"h-10 w-full rounded-full\" />\n      </div>\n    )\n  }\n\n  const formattedPrice = new Intl.NumberFormat(locale, {\n    style: \"currency\",\n    currency: currency === \"R$\" ? \"BRL\" : \"USD\",\n    maximumFractionDigits: 0,\n  }).format(price)\n  const formattedOriginal = originalPrice\n    ? new Intl.NumberFormat(locale, {\n        style: \"currency\",\n        currency: currency === \"R$\" ? \"BRL\" : \"USD\",\n        maximumFractionDigits: 0,\n      }).format(originalPrice)\n    : null\n  const periodLabel =\n    period === \"month\"\n      ? UI_I18N[locale].pricing.perMonth\n      : period === \"year\"\n        ? UI_I18N[locale].pricing.perYear\n        : \"\"\n\n  return (\n    <div\n      data-slot=\"pricing-card\"\n      className={cn(pricingCardVariants({ featured, size }), className)}\n      {...props}\n    >\n      <div className=\"flex flex-col gap-2\">\n        <div className=\"flex items-center justify-between gap-2\">\n          <h3 className=\"truncate text-base font-semibold text-foreground\">\n            {name}\n          </h3>\n          {badge && (\n            <Badge className=\"rounded-full bg-primary px-2.5 py-0.5 text-xs font-semibold text-primary-foreground\">\n              {badge}\n            </Badge>\n          )}\n          {featured && !badge && (\n            <Badge className=\"rounded-full bg-primary px-2.5 py-0.5 text-xs font-semibold text-primary-foreground\">\n              {UI_I18N[locale].pricing.mostPopular}\n            </Badge>\n          )}\n        </div>\n        {description && (\n          <p className=\"text-sm leading-relaxed text-muted-foreground\">\n            {description}\n          </p>\n        )}\n      </div>\n\n      <div className=\"flex items-baseline gap-2\">\n        {formattedOriginal && (\n          <span className=\"text-sm text-muted-foreground tabular-nums line-through\">\n            {formattedOriginal}\n          </span>\n        )}\n        <span\n          className=\"text-3xl font-bold tracking-tight text-foreground tabular-nums\"\n          aria-label={`${formattedPrice} ${periodLabel}`}\n        >\n          {formattedPrice}\n        </span>\n        <span className=\"text-sm text-muted-foreground\">{periodLabel}</span>\n      </div>\n\n      {features.length > 0 && (\n        <ul className=\"flex flex-col gap-2\">\n          {features.map((f) => (\n            <li key={f.label} className=\"flex items-center gap-2 text-sm\">\n              {f.included ? (\n                <CheckIcon\n                  className=\"size-4 shrink-0 text-success\"\n                  aria-hidden=\"true\"\n                />\n              ) : (\n                <XIcon\n                  className=\"size-4 shrink-0 text-muted-foreground/40\"\n                  aria-hidden=\"true\"\n                />\n              )}\n              <span\n                className={cn(\n                  \"truncate\",\n                  f.included ? \"text-foreground\" : \"text-muted-foreground\"\n                )}\n              >\n                {f.label}\n              </span>\n            </li>\n          ))}\n        </ul>\n      )}\n\n      {action &&\n        (action.href ? (\n          <Button\n            asChild\n            size=\"lg\"\n            variant={featured ? \"default\" : \"outline\"}\n            className=\"mt-auto w-full rounded-full font-semibold\"\n          >\n            <a href={action.href} onClick={action.onClick}>\n              {action.label}\n            </a>\n          </Button>\n        ) : (\n          <Button\n            size=\"lg\"\n            variant={featured ? \"default\" : \"outline\"}\n            className=\"mt-auto w-full rounded-full font-semibold\"\n            onClick={action.onClick}\n          >\n            {action.label}\n          </Button>\n        ))}\n    </div>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
