{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "like-button",
  "type": "registry:ui",
  "title": "Like button",
  "description": "Field-surface like with heart burst and count.",
  "dependencies": [],
  "registryDependencies": [
    "bricked-css",
    "pixel-icon"
  ],
  "files": [
    {
      "path": "registry/bricked-ui/like-button.tsx",
      "content": "import * as React from \"react\";\r\nimport { cva, type VariantProps } from \"class-variance-authority\";\r\nimport { cn } from \"@/lib/utils\";\r\nimport { PixelIcon, type PixelIconInput } from \"./pixel-icon\";\r\n\r\nconst s = cva(\"bk-like\", {\r\n  variants: {\r\n    size: { sm: \"[--px:4px] [--cut:1.5px] [--icon:3px] text-[11px]\", md: \"[--px:6px] [--cut:2px] [--icon:4px] text-[14px]\", lg: \"[--px:8px] [--cut:3px] [--icon:5px] text-[18px]\" },\r\n    variant: { primary: \"bg-brick text-ink\", dark: \"bg-ink text-on-dark\" },\r\n  },\r\n  defaultVariants: { size: \"md\", variant: \"primary\" },\r\n});\r\nexport interface LikeButtonProps extends React.ComponentProps<\"button\">, VariantProps<typeof s> { icon?: PixelIconInput; count?: number; }\r\nexport function LikeButton({ className, size, variant, icon = \"heart\", count = 12, ...props }: LikeButtonProps) {\r\n  const [on, setOn] = React.useState(false);\r\n  const [n, setN] = React.useState(count);\r\n  return (<button type=\"button\" aria-pressed={on} className={cn(s({ size, variant }), on && \"is-on\", className)} onClick={() => { setOn(!on); setN(n + (on ? -1 : 1)); }} {...props}><PixelIcon icon={icon} />{n}{on && <span className=\"bk-burst\" aria-hidden=\"true\">{[0,1,2,3].map(i => <span key={i} />)}</span>}</button>);\r\n}\r\n",
      "type": "registry:ui",
      "target": "components/ui/like-button.tsx"
    }
  ]
}