{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "fortune",
  "type": "registry:ui",
  "title": "Ask the wall",
  "description": "Random answer box.",
  "dependencies": [],
  "registryDependencies": [
    "bricked-css",
    "pixel-icon"
  ],
  "files": [
    {
      "path": "registry/bricked-ui/fortune.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 ANSWERS = [\"Lay one more brick.\", \"Ask again after a snack.\", \"Yes, build it.\", \"The wall says no.\", \"Take a break first.\", \"Orange is always right.\"];\r\nconst s = cva(\"bk-answer bk-cut\", {\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 FortuneProps extends React.ComponentProps<\"div\">, VariantProps<typeof s> { icon?: PixelIconInput; }\r\nexport function Fortune({ className, size, variant, icon = \"star\", ...props }: FortuneProps) {\r\n  const [a, setA] = React.useState(\"Ask me anything.\");\r\n  return (<div className={cn(s({ size, variant }), className)} {...props}><div className=\"bk-answer bk-cut\" aria-live=\"polite\">{a}</div><button type=\"button\" className=\"bricked-btn bricked-btn--sm\" onClick={() => setA(ANSWERS[Math.floor(Math.random() * ANSWERS.length)])}><PixelIcon icon={icon} />Ask</button></div>);\r\n}\r\n",
      "type": "registry:ui",
      "target": "components/ui/fortune.tsx"
    }
  ]
}