{
  "$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\" module>\n  import type { Snippet } from \"svelte\";\n\n  export 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 lang=\"ts\">\n  import Block from \"../compose/Block.svelte\";\n  import Button from \"../compose/Button.svelte\";\n  import Container from \"../compose/Container.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import Inline from \"../compose/Inline.svelte\";\n  import LinkPlain from \"../compose/LinkPlain.svelte\";\n  import LucideIcon from \"../icons/LucideIcon.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import { cn, urlOf } from \"../utils\";\n\n  let {\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 = $props();\n</script>\n\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      {#if ((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      {/if}\n      <Text size=\"sm\">\n        {text}\n      </Text>\n      {#if 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      {/if}\n    </Group>\n    {#if ((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    {/if}\n  </Container>\n</Block>\n",
      "path": "blocks/announcement-bar.svelte",
      "target": "blocks/announcement-bar.svelte"
    }
  ],
  "meta": {
    "category": "promo",
    "group": "banner",
    "kind": "block",
    "tags": [
      "svelte",
      "block"
    ]
  },
  "name": "announcement-bar",
  "registryDependencies": [
    "block",
    "button",
    "container",
    "group",
    "inline",
    "link-plain",
    "lucide-icon",
    "text",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Announcement Bar",
  "type": "registry:block"
}
