{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A consent notice with accept and decline buttons.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/cookie-banner.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/button\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// CookieBannerProps are the props of CookieBanner; the values are the JSON shapes of the TypeScript props.\ntype CookieBannerProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tText any `json:\"text\"`\n\tAccept any `json:\"accept\"`\n\tDecline any `json:\"decline\"`\n\tSettings any `json:\"settings\"`\n\tLayout any `json:\"layout\"`\n\tActions any `json:\"actions\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A consent notice: an icon, a heading, one paragraph and the buttons accept, decline and (optionally) settings. Axes: layout (bar, card), actions (two, three), tone (default, muted).\ntempl CookieBanner(p CookieBannerProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vText := p.Text }}\n\t{{ vAccept := p.Accept }}\n\t{{ vDecline := p.Decline }}\n\t{{ vSettings := p.Settings }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"bar\") }}\n\t{{ vActions := uiutils.Def(p.Actions, \"two\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"section\", Attrs: uiutils.Attrs(\"aria-labelledby\", uiutils.Cond(uiutils.T(vLandmarkLabel), nil, uiutils.Tpl(\"{0}-title\", vId)), \"data-layout\", vLayout, \"aria-label\", vLandmarkLabel, \"data-slot\", \"cookie\")}}) {\n\t\t@compose.Container(compose.ContainerProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"mx-auto w-full max-w-6xl px-4\", \"py-4\")), Attrs: uiutils.Attrs(\"data-slot\", \"container\")}}) {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"flex flex-col gap-4 rounded p-6 inset-ring inset-ring-border\", uiutils.Cond(uiutils.T(uiutils.Eq(vTone, \"muted\")), \"bg-muted\", \"bg-card\"), uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"bar\")), \"md:flex-row md:items-center md:justify-between\", \"mx-auto w-full max-w-md\")))}}) {\n\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"start\", BoxProps: box.BoxProps{Class: \"min-w-0\"}}) {\n\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"cookie\", Size: 24})\n\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"2\", Size: \"base\", Weight: \"bold\", TextProps: text.TextProps{Attrs: uiutils.Attrs(\"id\", uiutils.Tpl(\"{0}-title\", vId))}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(vTitle) }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(vText) }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", BoxProps: box.BoxProps{Class: \"shrink-0 flex-wrap\"}}) {\n\t\t\t\t\tif uiutils.T(uiutils.And(uiutils.Eq(vActions, \"three\"), vSettings)) {\n\t\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"ghost\", Size: \"sm\", ButtonProps: button.ButtonProps{Type: \"button\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(vSettings) }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"outline\", Size: \"sm\", ButtonProps: button.ButtonProps{Type: \"button\"}}) {\n\t\t\t\t\t\t{ uiutils.Text(vDecline) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"default\", Size: \"sm\", ButtonProps: button.ButtonProps{Type: \"button\"}}) {\n\t\t\t\t\t\t{ uiutils.Text(vAccept) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/cookie-banner.templ",
      "target": "blocks/cookie-banner.templ"
    }
  ],
  "meta": {
    "category": "promo",
    "group": "banner",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "cookie-banner",
  "registryDependencies": [
    "block",
    "box",
    "button",
    "container",
    "group",
    "kit-box",
    "kit-button",
    "kit-text",
    "lucide-icon",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Cookie Banner",
  "type": "registry:block"
}
