{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cookie-consent-bar",
  "title": "Cookie Consent — Bar",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/cookie-consent-bar/CookieConsentBar.tsx",
      "content": "'use client'\n\nimport { useEffect, useState } from 'react'\nimport { Cookie } from 'lucide-react'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Separator } from '@/components/ui/separator'\n\nexport function CookieConsentBar({ storageKey = 'uipkge:consent' }: { storageKey?: string }) {\n  const [visible, setVisible] = useState(false)\n\n  useEffect(() => {\n    try {\n      setVisible(!window.localStorage.getItem(storageKey))\n    } catch {\n      setVisible(true)\n    }\n  }, [storageKey])\n\n  function decide(choice: 'accepted' | 'rejected') {\n    setVisible(false)\n    try {\n      window.localStorage.setItem(storageKey, choice)\n    } catch {\n      // Blocked storage: the choice holds for this page view only.\n    }\n  }\n\n  if (!visible) return null\n\n  return (\n    <div\n      data-slot=\"cookie-consent-bar\"\n      className=\"border-border bg-card/95 fixed inset-x-0 bottom-0 z-50 border-t backdrop-blur\"\n      role=\"region\"\n      aria-label=\"Cookie consent\"\n    >\n      <div className=\"mx-auto flex max-w-6xl flex-col gap-4 px-6 py-4 lg:flex-row lg:items-center lg:gap-8\">\n        <div className=\"flex min-w-0 items-start gap-3\">\n          <Cookie className=\"text-muted-foreground mt-0.5 size-4 shrink-0\" aria-hidden=\"true\" />\n          <div className=\"min-w-0\">\n            <div className=\"flex flex-wrap items-center gap-2\">\n              <p className=\"text-sm font-medium\">We store two things</p>\n              <Badge variant=\"outline\">No ad tracking</Badge>\n            </div>\n            <p className=\"text-muted-foreground mt-1 text-sm leading-relaxed\">\n              A session cookie so you stay signed in, and an analytics cookie recording which pages get read. Rejecting\n              keeps the first and drops the second.\n            </p>\n          </div>\n        </div>\n\n        <Separator orientation=\"vertical\" className=\"hidden h-10 lg:block\" />\n\n        {/* Reject carries the same visual weight as accept. A ghost \"reject\"\n            beside a solid \"accept\" is a dark pattern with extra steps. */}\n        <div className=\"flex shrink-0 flex-wrap items-center gap-2\">\n          <Button variant=\"outline\" onClick={() => decide('rejected')}>\n            Reject analytics\n          </Button>\n          <Button onClick={() => decide('accepted')}>Accept</Button>\n          <Button variant=\"ghost\" size=\"sm\">\n            Manage\n          </Button>\n        </div>\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/CookieConsentBar.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/separator.json"
  ],
  "description": "Bottom consent bar offering accept, reject, and manage as equally weighted actions, with a one-line statement of what is actually stored.",
  "categories": [
    "marketing"
  ],
  "deprecated": true,
  "replacedBy": "cookie-consent"
}