{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button",
  "type": "registry:ui",
  "dependencies": [
    "@radix-ui/react-slot"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "ui/button.tsx",
      "content": "import type { ButtonHTMLAttributes } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cn } from \"@/lib/utils\";\n\nexport type ButtonVariant = \"default\" | \"secondary\" | \"ghost\" | \"outline\" | \"destructive\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\" | \"icon\";\n\nconst base =\n  \"group inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium outline-none transition focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50\";\n\nconst variants: Record<ButtonVariant, string> = {\n  default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n  secondary:\n    \"border border-hairline bg-panel text-foreground hover:bg-secondary\",\n  ghost:\n    \"text-muted-foreground hover:bg-panel hover:text-foreground data-[state=open]:bg-panel data-[state=open]:text-foreground\",\n  outline:\n    \"border border-hairline bg-transparent text-foreground hover:bg-panel\",\n  destructive: \"bg-destructive text-white hover:bg-destructive/90\",\n};\n\nconst sizes: Record<ButtonSize, string> = {\n  sm: \"h-8 px-3 text-sm\",\n  md: \"h-[38px] px-4 text-sm\",\n  lg: \"h-11 px-6 text-[15px]\",\n  icon: \"h-9 w-9\",\n};\n\n/** Class string for a button-styled element (button, link, etc). */\nexport function buttonClasses(opts?: {\n  variant?: ButtonVariant;\n  size?: ButtonSize;\n  className?: string;\n}) {\n  const { variant = \"default\", size = \"md\", className } = opts ?? {};\n  return cn(base, variants[variant], sizes[size], className);\n}\n\ntype ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n  variant?: ButtonVariant;\n  size?: ButtonSize;\n  /** Render as the child element (e.g. a Next <Link>) instead of a <button>. */\n  asChild?: boolean;\n};\n\nexport function Button({ variant, size, className, asChild, ...props }: ButtonProps) {\n  const Comp = asChild ? Slot : \"button\";\n  return <Comp className={buttonClasses({ variant, size, className })} {...props} />;\n}\n",
      "type": "registry:ui",
      "target": "components/ui/button.tsx"
    }
  ]
}
