{
  "$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/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/announcement-bar.json\n    A thin strip above the page: an icon, one sentence, a link and an optional close button. Axes: tone (default, muted), layout (center, split), dismiss (show, hide).\n    Props (p): label, text, cta, ctaHref, icon, dismissLabel, tone, layout, dismiss, badgeLabel, badge, position, landmarkLabel. -#}\n{%- set v_label = (p.label ?? null) -%}\n{%- set v_text = (p.text ?? null) -%}\n{%- set v_cta = (p.cta ?? null) -%}\n{%- set v_ctaHref = (p.ctaHref ?? null) -%}\n{%- set v_icon = (p.icon ?? 'megaphone') -%}\n{%- set v_dismissLabel = (p.dismissLabel ?? null) -%}\n{%- set v_tone = (p.tone ?? 'default') -%}\n{%- set v_layout = (p.layout ?? 'center') -%}\n{%- set v_dismiss = (p.dismiss ?? 'hide') -%}\n{%- set v_badgeLabel = (p.badgeLabel ?? null) -%}\n{%- set v_badge = (p.badge ?? 'none') -%}\n{%- set v_position = (p.position ?? 'top') -%}\n{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}\n{%- set c_7 -%}\n  {%- set c_6 -%}\n    {%- set c_4 -%}\n      {{ include('icons/LucideIcon.html.twig', {'name': og_s(v_icon), 'size': 16}, with_context = false) }}\n      {%- if og_t(og_eq(v_badge, 'show')) %}\n        {%- set c_1 -%}\n          {{ og_text(v_badgeLabel) }}\n        {%- endset -%}\n        {{ include('compose/Inline.html.twig', {'class': 'rounded px-2 py-0 text-xs font-semibold inset-ring inset-ring-current', 'attrs': og_attrs(['data-slot', 'announcement-badge']), 'children': c_1}, with_context = false) }}\n      {%- endif %}\n      {%- set c_2 -%}\n        {{ og_text(v_text) }}\n      {%- endset -%}\n      {{ include('compose/Text.html.twig', {'size': 'sm', 'children': c_2}, with_context = false) }}\n      {%- if og_t(v_cta) %}\n        {%- set c_3 -%}\n          {{ og_text(v_cta) }}\n          {{ include('icons/LucideIcon.html.twig', {'name': 'arrow-right', 'size': 16}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/LinkPlain.html.twig', {'href': og_url(og_s(v_ctaHref)), 'class': 'inline-flex items-center gap-2 text-sm font-semibold underline underline-offset-4', 'attrs': og_attrs(['data-slot', 'announcement-cta']), 'children': c_3}, with_context = false) }}\n      {%- endif %}\n    {%- endset -%}\n    {{ include('compose/Group.html.twig', {'gap': '4', 'align': 'center', 'class': og_s(og_cnv(['min-w-0 flex-wrap', (og_t(og_and([og_eq(v_layout, 'center'), og_eq(v_dismiss, 'show')])) ? 'ml-auto' : '')])), 'children': c_4}, with_context = false) }}\n    {%- if og_t(og_eq(v_dismiss, 'show')) %}\n      {%- set c_5 -%}\n        {{ include('icons/LucideIcon.html.twig', {'name': 'x', 'size': 16}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Button.html.twig', {'variant': 'ghost', 'size': 'sm', 'class': 'ml-auto shrink-0 text-current', 'type': 'button', 'attrs': og_attrs(['aria-label', v_dismissLabel]), 'children': c_5}, with_context = false) }}\n    {%- endif %}\n  {%- endset -%}\n  {{ include('compose/Container.html.twig', {'class': og_s(og_cnv(['mx-auto w-full max-w-6xl px-4', 'flex items-center gap-4 py-2', (og_t(og_eq(v_layout, 'split')) ? 'justify-between' : 'justify-center')])), 'attrs': og_attrs(['data-slot', 'container']), 'children': c_6}, with_context = false) }}\n{%- endset -%}\n{{ include('compose/Block.html.twig', {'tag': 'aside', 'class': og_s(og_cnv(['w-full', (og_t(og_eq(v_position, 'bottom')) ? 'sticky bottom-0 z-40 border-t border-border' : ''), (og_t(og_eq(v_tone, 'muted')) ? 'bg-muted text-foreground' : 'bg-primary text-primary-foreground')])), 'attrs': og_attrs(['aria-label', og_coalesce([v_landmarkLabel, v_label]), 'data-layout', v_layout, 'data-slot', 'announcement']), 'children': c_7}, with_context = false) }}\n",
      "path": "blocks/announcement-bar.html.twig",
      "target": "blocks/announcement-bar.html.twig"
    }
  ],
  "meta": {
    "category": "promo",
    "group": "banner",
    "kind": "block",
    "tags": [
      "twig",
      "block"
    ]
  },
  "name": "announcement-bar",
  "registryDependencies": [
    "block",
    "button",
    "container",
    "group",
    "inline",
    "link-plain",
    "lucide-icon",
    "text",
    "utils"
  ],
  "runtime": "twig",
  "title": "Announcement Bar",
  "type": "registry:block"
}
