{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dialog-11",
  "type": "registry:component",
  "title": "Dialog 11",
  "description": "Dialog 11. A dialog component for displaying important information or prompts.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button",
    "checkbox",
    "dialog",
    "label",
    "radio-group",
    "textarea"
  ],
  "files": [
    {
      "path": "components/watermelon/dialog-11.tsx",
      "type": "registry:component",
      "content": "import { useId } from 'react';\nimport { Frown, Meh, Smile, Laugh, Angry } from 'lucide-react';\n\nimport { Button } from '@/components/base-ui/button';\nimport { Checkbox } from '@/components/base-ui/checkbox';\nimport {\n  Dialog,\n  DialogClose,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n  DialogTrigger,\n} from '@/components/base-ui/dialog';\nimport { Label } from '@/components/base-ui/label';\nimport { RadioGroup, RadioGroupItem } from '@/components/base-ui/radio-group';\nimport { Textarea } from '@/components/base-ui/textarea';\nimport React from 'react';\n\nconst Dialog11 = () => {\n  const id = useId();\n\n  const ratings = [\n    {\n      value: '1',\n      label: 'Very Dissatisfied',\n      icon: <Angry size={22} strokeWidth={2} />,\n    },\n    {\n      value: '2',\n      label: 'Dissatisfied',\n      icon: <Frown size={22} strokeWidth={2} />,\n    },\n    { value: '3', label: 'Neutral', icon: <Meh size={22} strokeWidth={2} /> },\n    {\n      value: '4',\n      label: 'Satisfied',\n      icon: <Smile size={22} strokeWidth={2} />,\n    },\n    {\n      value: '5',\n      label: 'Very Satisfied',\n      icon: <Laugh size={22} strokeWidth={2} />,\n    },\n  ];\n\n  const [selectedRating, setSelectedRating] = React.useState('3');\n\n  const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n    e.preventDefault();\n    // Add your feedback logic here\n  };\n\n  return (\n    <Dialog>\n      <DialogTrigger>\n        <Button\n          variant=\"outline\"\n          className=\"rounded-lg border border-blue-200 bg-blue-50 px-6 py-2 font-medium text-blue-700 shadow-[inset_2px_2px_8px_0_rgba(255,255,255,0.18),_inset_-2px_-2px_8px_0_rgba(37,99,235,0.10)] transition-all hover:bg-blue-100 dark:border-blue-800 dark:bg-blue-900 dark:text-blue-200 dark:hover:bg-blue-800\"\n          style={{\n            boxShadow:\n              'inset 2px 2px 8px 0 rgba(255,255,255,0.18), inset -2px -2px 8px 0 rgba(37,99,235,0.10), 0 2px 8px 0 rgba(37,99,235,0.08)',\n          }}\n        >\n          Feedback\n        </Button>\n      </DialogTrigger>\n      <DialogContent className=\"rounded-2xl border-0 bg-white p-6 shadow-xl sm:max-w-md dark:bg-zinc-900\">\n        <DialogHeader className=\"text-left\">\n          <DialogTitle className=\"text-2xl font-bold text-zinc-900 dark:text-zinc-100\">\n            Feedback\n          </DialogTitle>\n          <DialogDescription className=\"text-sm text-zinc-600 dark:text-zinc-400\">\n            Help us improve by sharing your thoughts.\n          </DialogDescription>\n        </DialogHeader>\n        <form className=\"mt-2 flex flex-col gap-4\" onSubmit={handleSubmit}>\n          <fieldset className=\"mb-2 space-y-2 text-left\">\n            <legend className=\"text-sm font-medium text-zinc-700 dark:text-zinc-300\">\n              How was your experience today?\n            </legend>\n            <RadioGroup\n              className=\"mt-2 flex items-center justify-start gap-2\"\n              value={selectedRating}\n              name=\"rating\"\n              onValueChange={setSelectedRating}\n            >\n              {ratings.map((rating) => (\n                <label\n                  key={`${id}-${rating.value}`}\n                  className={`relative flex h-12 w-12 cursor-pointer items-center justify-center rounded-full border transition-all outline-none ${\n                    selectedRating === rating.value\n                      ? 'border-blue-600 bg-blue-50 ring-4 ring-blue-100 dark:border-blue-500 dark:bg-blue-500/10 dark:ring-blue-500/20'\n                      : 'border-zinc-300 bg-transparent hover:bg-zinc-100 dark:border-zinc-700 dark:hover:bg-zinc-800'\n                  }`}\n                  aria-checked={selectedRating === rating.value}\n                >\n                  <RadioGroupItem\n                    id={`${id}-${rating.value}`}\n                    value={rating.value}\n                    className=\"peer sr-only\"\n                  />\n                  <span\n                    className={`absolute inset-0 flex items-center justify-center transition-all duration-200 ${\n                      selectedRating === rating.value\n                        ? 'scale-110 text-blue-600 dark:text-blue-500'\n                        : 'text-zinc-500 dark:text-zinc-400'\n                    }`}\n                  >\n                    {rating.icon}\n                  </span>\n                </label>\n              ))}\n            </RadioGroup>\n          </fieldset>\n          <div className=\"grid gap-2 text-left\">\n            <Label\n              htmlFor=\"feedback-message\"\n              className=\"text-sm font-medium text-zinc-700 dark:text-zinc-200\"\n            >\n              Additional comments\n            </Label>\n            <Textarea\n              placeholder=\"Type your feedback here...\"\n              id=\"feedback-message\"\n              name=\"message\"\n              required\n              className=\"w-full rounded-lg border-zinc-300 bg-white text-zinc-900 placeholder:text-xs focus:ring-2 focus:ring-zinc-400 sm:placeholder:text-sm dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100\"\n            />\n            <p className=\"text-right text-xs text-zinc-400\">0/500 characters</p>\n          </div>\n          <div className=\"flex items-center gap-3 text-left\">\n            <div className=\"relative\">\n              <Checkbox\n                id=\"consent\"\n                className=\"peer data-[state=checked]:border-blue-600 data-[state=checked]:bg-white data-[state=checked]:ring-2 data-[state=checked]:ring-blue-200\"\n              />\n              <style>{`\n                .peer[data-state=\"checked\"] svg {\n                  color: #2563eb !important;\n                  stroke: #2563eb !important;\n                }\n              `}</style>\n            </div>\n            <Label\n              htmlFor=\"consent\"\n              className=\"text-sm text-zinc-600 dark:text-zinc-300\"\n            >\n              I consent to being contacted about my feedback\n            </Label>\n          </div>\n          <DialogFooter className=\"gap-2 border-none bg-transparent shadow-none sm:justify-end\">\n            <DialogClose asChild>\n              <Button\n                variant=\"outline\"\n                className=\"w-full rounded-lg px-6 py-2.5 font-medium sm:w-auto\"\n              >\n                Cancel\n              </Button>\n            </DialogClose>\n            <Button\n              type=\"submit\"\n              className=\"w-full rounded-lg border-0 bg-green-600 px-6 py-2.5 font-semibold text-white shadow-[inset_2px_2px_8px_0_rgba(255,255,255,0.18),_inset_-2px_-2px_8px_0_rgba(22,163,74,0.10)] transition-all duration-200 hover:bg-green-700 sm:w-auto\"\n              style={{\n                boxShadow:\n                  'inset 2px 2px 8px 0 rgba(255,255,255,0.18), inset -2px -2px 8px 0 rgba(22,163,74,0.10), 0 2px 8px 0 rgba(22,163,74,0.08)',\n              }}\n            >\n              Submit\n            </Button>\n          </DialogFooter>\n        </form>\n      </DialogContent>\n    </Dialog>\n  );\n};\n\nexport default Dialog11;\n"
    }
  ]
}
