{
  "$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-->\n<script lang=\"ts\">\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</script>\n\n<script setup lang=\"ts\">\nimport Block from \"../compose/Block.vue\";\nimport Button from \"../compose/Button.vue\";\nimport Container from \"../compose/Container.vue\";\nimport Group from \"../compose/Group.vue\";\nimport Inline from \"../compose/Inline.vue\";\nimport LinkPlain from \"../compose/LinkPlain.vue\";\nimport LucideIcon from \"../icons/LucideIcon.vue\";\nimport Text from \"../compose/Text.vue\";\nimport { cn, urlOf } from \"../utils\";\n\nconst {\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} = defineProps<AnnouncementBarProps>();\n</script>\n\n<template>\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        <Inline v-if=\"((badge as string) === 'show')\"\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        <Text size=\"sm\">\n          {{ text }}\n        </Text>\n        <LinkPlain v-if=\"cta\"\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      </Group>\n      <Button v-if=\"((dismiss as string) === 'show')\"\n        variant=\"ghost\"\n        size=\"sm\"\n        class=\"ml-auto shrink-0 text-current\"\n        type=\"button\"\n        :aria-label=\"dismissLabel\"\n      >\n        <LucideIcon name=\"x\" :size=\"16\" />\n      </Button>\n    </Container>\n  </Block>\n</template>\n",
      "path": "blocks/announcement-bar.vue",
      "target": "blocks/announcement-bar.vue"
    }
  ],
  "meta": {
    "category": "promo",
    "group": "banner",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "announcement-bar",
  "registryDependencies": [
    "block",
    "button",
    "container",
    "group",
    "inline",
    "link-plain",
    "lucide-icon",
    "text",
    "utils"
  ],
  "runtime": "vue",
  "title": "Announcement Bar",
  "type": "registry:block"
}
