{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "mc-sonner",
  "title": "MicroClub Sonner",
  "description": "A toast component for MicroClub UI",
  "dependencies": [
    "sonner",
    "lucide-react"
  ],
  "files": [
    {
      "path": "registry/ui/mc-sonner.tsx",
      "content": "'use client';\n\nimport { Toaster as SonnerComponent, toast as rawToast } from 'sonner';\nimport { CheckCircle2, AlertCircle } from 'lucide-react';\n\ntype ToasterProps = React.ComponentProps<typeof SonnerComponent>;\n\nconst toastIcons = {\n  success: <CheckCircle2 className=\"text-muted-foreground shrink-0 h-3.5 w-3.5\" />,\n  warning: <AlertCircle className=\"text-muted-foreground shrink-0 h-3.5 w-3.5\" />,\n  error: <AlertCircle className=\"text-muted-foreground  shrink-0 h-3.5 w-3.5\" />,\n};\n\ninterface ToastOptions {\n  description?: string;\n  action?: {\n    label: string;\n    onClick: () => void;\n  };\n}\n\nconst mcToastCustom = (\n  message: string,\n  variant?: 'success' | 'warning' | 'error',\n  options?: ToastOptions\n) => {\n  const Icon = variant ? toastIcons[variant] : null;\n\n  return rawToast(\n    <div className=\"w-full h-full flex flex-col items-start justify-center gap-0.5\">\n      <div className=\"flex items-center gap-1.5 w-full max-w-66.5\">\n        {Icon}\n        <span className=\"text-sm font-medium tracking-normal leading-5 text-card-foreground\">\n          {message}\n        </span>\n      </div>\n\n      {options?.description && (\n        <p className=\"text-sm font-normal tracking-normal leading-5 text-muted-foreground max-w-66.5\">\n          {options.description}\n        </p>\n      )}\n    </div>,\n    {\n      action: options?.action,\n    }\n  );\n};\n\nexport const toast = Object.assign(\n  (message: string, options?: ToastOptions) => mcToastCustom(message, undefined, options),\n  {\n    success: (message: string, options?: ToastOptions) =>\n      mcToastCustom(message, 'success', options),\n    warning: (message: string, options?: ToastOptions) =>\n      mcToastCustom(message, 'warning', options),\n    error: (message: string, options?: ToastOptions) => mcToastCustom(message, 'error', options),\n  }\n);\n\nconst McSonner = ({ ...props }: ToasterProps) => {\n  return (\n    <SonnerComponent\n      className=\"\"\n      position=\"top-center\"\n      toastOptions={{\n        unstyled: true,\n        classNames: {\n          toast:\n            'w-97.5 min-h-18.5 bg-background flex items-center justify-between gap-1.5 p-4 border-[1px] rounded-lg shadow-xs border-border',\n          actionButton:\n            'flex items-center justify-center bg-primary text-background text-sm py-2 px-3.5 min-w-15.5 max-w-21.5 min-h-9 rounded-[8px] shadow-xs shrink-0 cursor-pointer',\n        },\n      }}\n      {...props}\n    />\n  );\n};\n\nexport default McSonner;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}