{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button",
  "type": "registry:ui",
  "description": "Trigger actions or navigate when clicked.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "components/ui/button.tsx",
      "content": "import * as React from \"react\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\nimport { cn } from \"@/lib/utils\"\r\n\r\ntype SlotProps = React.HTMLAttributes<HTMLElement> & {\r\n    children?: React.ReactNode\r\n}\r\n\r\nconst Slot = React.forwardRef<HTMLElement, SlotProps>(\r\n    ({ children, ...props }, ref) => {\r\n        if (React.isValidElement<Record<string, unknown>>(children)) {\r\n            const childProps = children.props as Record<string, unknown>\r\n            return React.cloneElement(children, {\r\n                ...props,\r\n                ...childProps,\r\n                ref,\r\n                className: cn(props.className as string, childProps.className as string),\r\n            })\r\n        }\r\n        return null\r\n    }\r\n)\r\nSlot.displayName = \"Slot\"\r\n\r\nconst buttonVariants = cva(\r\n    \"inline-flex items-center justify-center whitespace-nowrap rounded-base text-sm font-bold transition-brutal focus-brutal disabled:pointer-events-none disabled:opacity-50 border-2 border-black cursor-pointer\",\r\n    {\r\n        variants: {\r\n            variant: {\r\n                default: \"bg-main text-black shadow-brutal hover:translate-x-[1px] hover:translate-y-[1px] hover:shadow-none\",\r\n                noShadow: \"bg-main text-black border-2 border-black\",\r\n                neutral: \"bg-white text-black shadow-brutal hover:translate-x-[1px] hover:translate-y-[1px] hover:shadow-none\",\r\n            },\r\n            size: {\r\n                default: \"h-10 px-4 py-2\",\r\n                sm: \"h-9 px-3\",\r\n                lg: \"h-11 px-8\",\r\n                icon: \"h-10 w-10\",\r\n            },\r\n        },\r\n        defaultVariants: {\r\n            variant: \"default\",\r\n            size: \"default\",\r\n        },\r\n    }\r\n)\r\n\r\nexport type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &\r\n    VariantProps<typeof buttonVariants> & {\r\n        asChild?: boolean\r\n    }\r\n\r\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\r\n    ({ className, variant, size, asChild = false, ...props }, ref) => {\r\n        const Comp = asChild ? Slot : \"button\"\r\n        return (\r\n            <Comp\r\n                className={cn(buttonVariants({ variant, size, className }))}\r\n                ref={ref}\r\n                {...props}\r\n            />\r\n        )\r\n    }\r\n)\r\nButton.displayName = \"Button\"\r\n\r\nexport { Button, buttonVariants }\r\n",
      "type": "registry:ui"
    }
  ]
}