{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "banner-2",
  "type": "registry:block",
  "title": "Banner 2",
  "description": "Cookie consent card with accept, reject and preferences actions.",
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "app/preview/banner/two/page.tsx",
      "content": "'use client'\n\nimport { useState } from 'react'\nimport Link from 'next/link'\nimport { Cookie } from 'lucide-react'\nimport { Button } from '@/components/ui/button'\n\ntype Choice = 'accepted' | 'rejected' | null\n\nexport default function CookieBanner() {\n    const [choice, setChoice] = useState<Choice>(null)\n\n    return (\n        <div className=\"relative min-h-[420px]\">\n            {choice && (\n                <div className=\"flex min-h-[420px] flex-col items-center justify-center gap-3 text-sm\">\n                    <p className=\"text-muted-foreground\">\n                        Cookies {choice}. Wire this choice to your analytics or consent manager.\n                    </p>\n                    <button\n                        type=\"button\"\n                        onClick={() => setChoice(null)}\n                        className=\"underline underline-offset-4\">\n                        Reset\n                    </button>\n                </div>\n            )}\n\n            {!choice && (\n                <div\n                    role=\"dialog\"\n                    aria-modal=\"false\"\n                    aria-labelledby=\"cookie-title\"\n                    aria-describedby=\"cookie-body\"\n                    className=\"bg-background fixed inset-x-4 bottom-4 z-50 mx-auto max-w-xl rounded-2xl border p-5 shadow-2xl shadow-black/10 sm:left-6 sm:right-auto sm:mx-0\">\n                    <div className=\"flex gap-4\">\n                        <span className=\"bg-muted flex size-10 shrink-0 items-center justify-center rounded-full\">\n                            <Cookie className=\"size-5\" />\n                        </span>\n                        <div>\n                            <h2\n                                id=\"cookie-title\"\n                                className=\"font-medium\">\n                                We value your privacy\n                            </h2>\n                            <p\n                                id=\"cookie-body\"\n                                className=\"text-muted-foreground mt-1 text-sm\">\n                                We use cookies to keep you signed in and to understand how the site is used. Read our{' '}\n                                <Link\n                                    href=\"#\"\n                                    className=\"text-foreground underline underline-offset-4\">\n                                    cookie policy\n                                </Link>\n                                .\n                            </p>\n                        </div>\n                    </div>\n                    <div className=\"mt-5 flex flex-wrap justify-end gap-2\">\n                        <Button\n                            variant=\"ghost\"\n                            size=\"sm\"\n                            asChild>\n                            <Link href=\"#\">Preferences</Link>\n                        </Button>\n                        <Button\n                            variant=\"outline\"\n                            size=\"sm\"\n                            onClick={() => setChoice('rejected')}>\n                            Reject all\n                        </Button>\n                        <Button\n                            size=\"sm\"\n                            onClick={() => setChoice('accepted')}>\n                            Accept all\n                        </Button>\n                    </div>\n                </div>\n            )}\n        </div>\n    )\n}\n",
      "type": "registry:component",
      "target": "components/banner-2.tsx"
    }
  ]
}