{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A thin strip above the page with one sentence and a link.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * A thin strip above the page: an icon, one sentence, a link and an optional close button. Axes: tone (default,\n * muted), layout (center, split), dismiss (show, hide).\n */\nimport { type JSX } from \"solid-js\";\nimport { Block, Button, Container, Group, Inline, LinkPlain, Text } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { cn, urlOf } from \"../utils\";\n\nexport type AnnouncementBarProps = {\n  label: string;\n  text: string;\n  cta?: string;\n  ctaHref?: string;\n  icon?: string;\n  dismissLabel: string;\n  tone?: \"default\" | \"muted\";\n  layout?: \"center\" | \"split\";\n  dismiss?: \"show\" | \"hide\";\n  badgeLabel?: string;\n  badge?: \"none\" | \"show\";\n  position?: \"top\" | \"bottom\";\n  landmarkLabel?: string;\n};\n\nexport function AnnouncementBar({\n  label,\n  text,\n  cta,\n  ctaHref,\n  icon = \"megaphone\",\n  dismissLabel,\n  tone = \"default\",\n  layout = \"center\",\n  dismiss = \"hide\",\n  badgeLabel,\n  badge = \"none\",\n  position = \"top\",\n  landmarkLabel,\n}: AnnouncementBarProps) {\n  return (\n    <Block\n      tag=\"aside\"\n      class={cn(\n        \"w-full\",\n        (((position as string) === \"bottom\") ? \"sticky bottom-0 z-40 border-t border-border\" : \"\"),\n        (\n          (tone as string) === \"muted\" ? \"bg-muted text-foreground\"\n          : \"bg-primary text-primary-foreground\"\n        )\n      )}\n      aria-label={(landmarkLabel ?? label)}\n      data-layout={layout}\n      data-slot=\"announcement\"\n    >\n      <Container\n        class={cn(\n          \"mx-auto w-full max-w-6xl px-4\",\n          \"flex items-center gap-4 py-2\",\n          (((layout as string) === \"split\") ? \"justify-between\" : \"justify-center\")\n        )}\n        data-slot=\"container\"\n      >\n        <Group\n          gap=\"4\"\n          align=\"center\"\n          class={cn(\n            \"min-w-0 flex-wrap\",\n            ((((layout as string) === \"center\") && ((dismiss as string) === \"show\")) ? \"ml-auto\" : \"\")\n          )}\n        >\n          <LucideIcon name={icon} size={16} />\n          {((badge as string) === \"show\") ? (\n            <Inline\n              class=\"rounded px-2 py-0 text-xs font-semibold inset-ring inset-ring-current\"\n              data-slot=\"announcement-badge\"\n            >\n              {badgeLabel}\n            </Inline>\n          ) : null}\n          <Text size=\"sm\">\n            {text}\n          </Text>\n          {cta ? (\n            <LinkPlain\n              href={urlOf(ctaHref)}\n              class=\"inline-flex items-center gap-2 text-sm font-semibold underline underline-offset-4\"\n              data-slot=\"announcement-cta\"\n            >\n              {cta}\n              <LucideIcon name=\"arrow-right\" size={16} />\n            </LinkPlain>\n          ) : null}\n        </Group>\n        {((dismiss as string) === \"show\") ? (\n          <Button variant=\"ghost\" size=\"sm\" class=\"ml-auto shrink-0 text-current\" type=\"button\" aria-label={dismissLabel}>\n            <LucideIcon name=\"x\" size={16} />\n          </Button>\n        ) : null}\n      </Container>\n    </Block>\n  );\n}\n",
      "path": "blocks/announcement-bar.tsx",
      "target": "blocks/announcement-bar.tsx"
    }
  ],
  "meta": {
    "category": "promo",
    "group": "banner",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "announcement-bar",
  "registryDependencies": [
    "compose",
    "lucide-icon",
    "utils"
  ],
  "runtime": "solid",
  "title": "Announcement Bar",
  "type": "registry:block"
}
