{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "popover-9",
  "type": "registry:component",
  "title": "Popover 9",
  "description": "Popover 9. Popovers are used to display rich content within an overlay that is triggered by a button click.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button",
    "checkbox",
    "label",
    "popover",
    "slider"
  ],
  "files": [
    {
      "path": "components/watermelon/popover-9.tsx",
      "type": "registry:component",
      "content": "'use client';\n\nimport { useState } from 'react';\n\nimport { FunnelIcon, RotateCcwIcon } from 'lucide-react';\n\nimport { Button } from '@/components/base-ui/button';\nimport { Checkbox } from '@/components/base-ui/checkbox';\nimport { Label } from '@/components/base-ui/label';\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from '@/components/base-ui/popover';\nimport { Slider } from '@/components/base-ui/slider';\n\nconst filters = ['Architectural', 'Structural', 'Electrical', 'Plumbing'];\n\nconst Popover9 = () => {\n  const [selected, setSelected] = useState(['Architectural', 'Structural']);\n  const [price, setPrice] = useState([450]);\n\n  return (\n    <Popover>\n      <PopoverTrigger asChild backdrop-blur-sm>\n        <Button\n          variant=\"outline\"\n          size=\"icon\"\n          className=\"rounded-xl transition-all hover:bg-neutral-100 active:scale-95 dark:hover:bg-neutral-800\"\n        >\n          <FunnelIcon className=\"size-4\" />\n          <span className=\"sr-only\">Filter</span>\n        </Button>\n      </PopoverTrigger>\n      <PopoverContent className=\"shadow-3xl w-80 rounded-3xl border-neutral-100 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-950\">\n        <div className=\"flex flex-col gap-4\">\n          <div className=\"flex items-center justify-between gap-4 pb-1\">\n            <div className=\"flex flex-col gap-0.5\">\n              <span className=\"text-base font-bold tracking-tight text-neutral-900 dark:text-neutral-100\">\n                Advanced Filters\n              </span>\n              <p className=\"text-[11px] font-medium text-neutral-500\">\n                Filter by attributes\n              </p>\n            </div>\n            <Button\n              variant=\"outline\"\n              className=\"h-8 gap-1.5 rounded-xl border-neutral-200 px-3 py-1 text-[11px] font-bold text-neutral-500 dark:border-neutral-800 dark:text-neutral-400\"\n              onClick={() => {\n                setSelected(['Architectural', 'Structural']);\n                setPrice([450]);\n              }}\n            >\n              <RotateCcwIcon className=\"size-3.5\" />\n              Reset all\n            </Button>\n          </div>\n\n          <div className=\"flex flex-col gap-2\">\n            <Label className=\"text-sm text-neutral-400\">Filter category</Label>\n            <div className=\"flex flex-col gap-1.5\">\n              {filters.map((label, index) => (\n                <div\n                  key={index}\n                  className=\"group flex cursor-pointer items-center gap-3 rounded-xl p-2 transition-colors hover:bg-neutral-50 dark:hover:bg-neutral-900\"\n                  onClick={() => {\n                    setSelected(\n                      selected.includes(label)\n                        ? selected.filter((item) => item !== label)\n                        : [...selected, label],\n                    );\n                  }}\n                >\n                  <Checkbox\n                    id={`filter-${index + 1}`}\n                    checked={selected.includes(label)}\n                    onCheckedChange={(checked) =>\n                      setSelected(\n                        checked\n                          ? [...selected, label]\n                          : selected.filter((item) => item !== label),\n                      )\n                    }\n                    className=\"size-4.5 rounded-md border-neutral-300 data-[state=checked]:border-orange-500 data-[state=checked]:bg-orange-500 dark:border-neutral-700\"\n                  />\n                  <Label\n                    htmlFor={`filter-${index + 1}`}\n                    className=\"cursor-pointer text-sm font-semibold text-neutral-700 dark:text-neutral-300\"\n                  >\n                    {label}\n                  </Label>\n                </div>\n              ))}\n            </div>\n          </div>\n\n          <div className=\"flex flex-col gap-2\">\n            <div className=\"flex items-center justify-between\">\n              <Label className=\"text-xs text-neutral-400\">Budget range</Label>\n              <span className=\"text-xs font-bold text-orange-600 dark:text-orange-500\">\n                $0 - ${price[0]}\n              </span>\n            </div>\n            <div className=\"flex flex-col gap-2\">\n              <Slider\n                value={price}\n                onValueChange={setPrice}\n                step={50}\n                max={1000}\n                className=\"[&>[data-slot=slider-range]]:bg-orange-500 [&>[data-slot=slider-thumb]]:border-orange-500\"\n                aria-label=\"Price range\"\n              />\n              <div className=\"flex w-full items-center justify-between gap-1 px-0.5 text-[10px] font-medium text-neutral-400 opacity-60\">\n                <span>0</span>\n                <span>500</span>\n                <span>1000+</span>\n              </div>\n            </div>\n          </div>\n        </div>\n      </PopoverContent>\n    </Popover>\n  );\n};\n\nexport default Popover9;\n"
    }
  ]
}
