{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ds-empty-action",
  "title": "Empty Action",
  "description": "Estado vazio acionável com ação principal, atalhos e sugestões para zero-data e onboarding.",
  "dependencies": [
    "class-variance-authority",
    "lucide-react"
  ],
  "registryDependencies": [
    "@lema-ds/button",
    "@lema-ds/ui-i18n",
    "@lema-ds/ds-locale-provider"
  ],
  "files": [
    {
      "path": "components/ds/ds-empty-action.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Inbox, CheckCircle2 } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { UI_I18N, type UILocale } from \"@/lib/ui-i18n\"\nimport { useUILocale } from \"@/components/ui/ds-locale-provider\"\n\n// ── Variants ──\n\nexport const emptyActionVariants = cva(\n  \"flex flex-col items-center justify-center rounded-xl border border-dashed border-border bg-card/50 text-center\",\n  {\n    variants: {\n      size: {\n        sm: \"gap-3 p-6\",\n        md: \"gap-4 p-8 sm:p-12\",\n        lg: \"gap-6 p-12 sm:p-16\",\n      },\n    },\n    defaultVariants: {\n      size: \"md\",\n    },\n  }\n)\n\n// ── Types ──\n\nexport interface EmptyActionItem {\n  label: string\n  onClick?: () => void\n  icon?: React.ReactNode\n}\n\nexport interface EmptyActionProps\n  extends\n    Omit<React.HTMLAttributes<HTMLDivElement>, \"title\">,\n    VariantProps<typeof emptyActionVariants> {\n  /**\n   * Top illustration or icon.\n   */\n  icon?: React.ReactNode\n  /**\n   * Primary title.\n   */\n  title: React.ReactNode\n  /**\n   * Explanatory description.\n   */\n  description: React.ReactNode\n  /**\n   * Primary call to action button.\n   */\n  primaryAction?: EmptyActionItem\n  /**\n   * Secondary action button or documentation link.\n   */\n  secondaryAction?: EmptyActionItem\n  /**\n   * Optional recommended next steps list.\n   */\n  suggestions?: string[]\n  /**\n   * Localization locale.\n   */\n  locale?: UILocale\n}\n\n// ── Component ──\n\nexport const EmptyAction = React.forwardRef<HTMLDivElement, EmptyActionProps>(\n  (\n    {\n      icon,\n      title,\n      description,\n      primaryAction,\n      secondaryAction,\n      suggestions,\n      size = \"md\",\n      locale: localeProp,\n      className,\n      ...props\n    },\n    ref\n  ) => {\n    const locale = useUILocale(localeProp)\n    const t = UI_I18N[locale].emptyAction\n\n    const iconWrapperSize =\n      size === \"sm\" ? \"size-10\" : size === \"lg\" ? \"size-16\" : \"size-12\"\n\n    const iconInnerSize =\n      size === \"sm\" ? \"size-5\" : size === \"lg\" ? \"size-8\" : \"size-6\"\n\n    return (\n      <div\n        ref={ref}\n        role=\"status\"\n        className={cn(emptyActionVariants({ size }), className)}\n        {...props}\n      >\n        {/* Icon slot */}\n        <div\n          className={cn(\n            \"flex shrink-0 items-center justify-center rounded-full bg-muted/60 text-muted-foreground\",\n            iconWrapperSize\n          )}\n        >\n          {icon ? (\n            <div className={iconInnerSize}>{icon}</div>\n          ) : (\n            <Inbox className={iconInnerSize} />\n          )}\n        </div>\n\n        {/* Text content — max-w-prose (65ch) ensures 200% zoom reflow without overflow */}\n        <div className=\"flex max-w-prose flex-col items-center gap-1.5\">\n          <h3\n            className={cn(\n              \"font-semibold tracking-tight text-foreground\",\n              size === \"sm\" && \"text-sm\",\n              size === \"md\" && \"text-base\",\n              size === \"lg\" && \"text-base\"\n            )}\n          >\n            {title}\n          </h3>\n          <p\n            className={cn(\n              \"max-w-prose leading-relaxed text-muted-foreground\",\n              size === \"sm\" ? \"text-xs\" : \"text-sm\"\n            )}\n          >\n            {description}\n          </p>\n        </div>\n\n        {/* Action Buttons */}\n        {(primaryAction || secondaryAction) && (\n          <div className=\"flex flex-wrap items-center justify-center gap-2 pt-1\">\n            {primaryAction && (\n              <Button\n                type=\"button\"\n                size={size === \"sm\" ? \"sm\" : \"default\"}\n                onClick={primaryAction.onClick}\n              >\n                {primaryAction.icon && (\n                  <span className=\"mr-1.5\">{primaryAction.icon}</span>\n                )}\n                {primaryAction.label || t.primaryAction}\n              </Button>\n            )}\n            {secondaryAction && (\n              <Button\n                type=\"button\"\n                variant=\"outline\"\n                size={size === \"sm\" ? \"sm\" : \"default\"}\n                onClick={secondaryAction.onClick}\n              >\n                {secondaryAction.label || t.secondaryAction}\n              </Button>\n            )}\n          </div>\n        )}\n\n        {/* Suggestions / Checklist */}\n        {suggestions && suggestions.length > 0 && (\n          <div className=\"flex w-full max-w-xs flex-col items-start gap-1.5 border-t border-border pt-3 text-left\">\n            <span className=\"pb-1 text-xs font-semibold tracking-wider text-muted-foreground uppercase\">\n              {t.recommended}:\n            </span>\n            {suggestions.map((sug, i) => (\n              <div\n                key={i}\n                className=\"flex items-center gap-2 text-xs text-muted-foreground\"\n              >\n                <CheckCircle2 className=\"size-3.5 shrink-0 text-primary\" />\n                <span>{sug}</span>\n              </div>\n            ))}\n          </div>\n        )}\n      </div>\n    )\n  }\n)\n\nEmptyAction.displayName = \"EmptyAction\"\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
