{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "notifications-3",
  "title": "Digest Frequency",
  "description": "Digest Frequency for Notifications.",
  "dependencies": [],
  "registryDependencies": [
    "card",
    "select"
  ],
  "files": [
    {
      "path": "registry/intents/account/notifications/notifications-3.tsx",
      "content": "'use client'\n\nimport { useState } from 'react'\n\nimport { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'\nimport {\n  Select,\n  SelectGroup,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from '@/components/ui/select'\n\ntype Item = { id: string; label: string; hint: string; value: string }\n\nconst FREQUENCIES = [\n  { value: 'off', label: 'Off' },\n  { value: 'realtime', label: 'Real time' },\n  { value: 'daily', label: 'Daily digest' },\n  { value: 'weekly', label: 'Weekly digest' },\n]\n\nconst INITIAL: Item[] = [\n  {\n    id: 'activity',\n    label: 'Activity summary',\n    hint: 'Comments, mentions, and reactions',\n    value: 'daily',\n  },\n  {\n    id: 'team',\n    label: 'Team updates',\n    hint: 'Members joining and role changes',\n    value: 'weekly',\n  },\n  {\n    id: 'product',\n    label: 'Product news',\n    hint: 'Features and announcements',\n    value: 'weekly',\n  },\n  {\n    id: 'tips',\n    label: 'Tips and onboarding',\n    hint: 'Suggestions to get more done',\n    value: 'off',\n  },\n]\n\nexport function Notifications3() {\n  const [items, setItems] = useState<Item[]>(INITIAL)\n\n  const setValue = (id: string, value: string) =>\n    setItems((prev) =>\n      prev.map((item) => (item.id === id ? { ...item, value } : item)),\n    )\n\n  return (\n    <Card>\n      <CardHeader>\n        <CardTitle>Email frequency</CardTitle>\n      </CardHeader>\n      <CardContent className=\"flex flex-col gap-5\">\n        {items.map((item) => (\n          <div\n            key={item.id}\n            className=\"flex flex-col justify-between gap-4 md:flex-row md:items-center\"\n          >\n            <div className=\"flex flex-col\">\n              <span className=\"text-sm font-medium\">{item.label}</span>\n              <span className=\"text-muted-foreground text-xs\">{item.hint}</span>\n            </div>\n            <Select\n              value={item.value}\n              onValueChange={(v) => setValue(item.id, v ?? '')}\n            >\n              <SelectTrigger className=\"w-36 shrink-0\">\n                <SelectValue />\n              </SelectTrigger>\n              <SelectContent>\n                <SelectGroup>\n                  {FREQUENCIES.map((freq) => (\n                    <SelectItem key={freq.value} value={freq.value}>\n                      {freq.label}\n                    </SelectItem>\n                  ))}\n                </SelectGroup>\n              </SelectContent>\n            </Select>\n          </div>\n        ))}\n      </CardContent>\n    </Card>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/flx/intent/notifications/notifications-3.tsx"
    }
  ],
  "type": "registry:block"
}