{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ds-blog-meta",
  "title": "Blog Meta",
  "description": "Linha de metadados: data, reading time e categoria.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@lema-ds/badge",
    "@lema-ds/skeleton",
    "@lema-ds/ui-i18n",
    "@lema-ds/ds-locale-provider"
  ],
  "files": [
    {
      "path": "components/ds/ds-blog-meta.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\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 { Skeleton } from \"@/components/ui/skeleton\"\n\n// ── Types ──────────────────────────────────────────────────────────────────\n\nexport interface BlogMetaProps\n  extends\n    React.HTMLAttributes<HTMLDivElement>,\n    VariantProps<typeof blogMetaVariants> {\n  publishedAt?: string | Date\n  readingTime?: number\n  category?: string\n  locale?: UILocale\n  loading?: boolean\n}\n\n// ── Variants ───────────────────────────────────────────────────────────────\n\nexport const blogMetaVariants = cva(\n  \"flex flex-wrap items-center gap-2 text-xs text-muted-foreground\",\n  {\n    variants: {\n      size: {\n        sm: \"text-xs\",\n        md: \"text-xs\",\n      },\n    },\n    defaultVariants: { size: \"md\" },\n  }\n)\n\n// ── Component ──────────────────────────────────────────────────────────────\n\nexport function BlogMeta({\n  className,\n  publishedAt,\n  readingTime,\n  category,\n  locale: localeProp,\n  size = \"md\",\n  loading = false,\n  ...props\n}: BlogMetaProps) {\n  const locale = useUILocale(localeProp)\n  if (loading) {\n    return (\n      <div\n        data-slot=\"blog-meta-skeleton\"\n        className={cn(blogMetaVariants({ size }), className)}\n        {...props}\n      >\n        <Skeleton className=\"h-3 w-20\" />\n        <Skeleton className=\"h-3 w-12\" />\n        <Skeleton className=\"h-5 w-16 rounded-full\" />\n      </div>\n    )\n  }\n\n  const formattedDate = publishedAt\n    ? new Intl.DateTimeFormat(locale, {\n        day: \"numeric\",\n        month: \"short\",\n        year: \"numeric\",\n      }).format(\n        typeof publishedAt === \"string\" ? new Date(publishedAt) : publishedAt\n      )\n    : null\n\n  return (\n    <div\n      data-slot=\"blog-meta\"\n      className={cn(blogMetaVariants({ size }), className)}\n      {...props}\n    >\n      {category && (\n        <Badge\n          variant=\"outline\"\n          className=\"h-5 rounded-full px-2 text-xs font-medium\"\n        >\n          {category}\n        </Badge>\n      )}\n      {formattedDate && <span className=\"truncate\">{formattedDate}</span>}\n      {formattedDate && readingTime && <span aria-hidden=\"true\">·</span>}\n      {typeof readingTime === \"number\" && (\n        <span className=\"tabular-nums\">\n          {readingTime} {UI_I18N[locale].blog.minRead}\n        </span>\n      )}\n    </div>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
