{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A top bar whose first item opens a wide panel of link groups, with an optional promo card.",
  "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/mega-menu.json\n    A top bar whose first item opens a wide panel of link groups, each with an icon and a list, and an optional promo card. The page keeps `open`; opening on hover or click is a port contract. Axes: panel (open, closed), cols (2, 3), promo (none, card).\n    Props (p): label, brand, brandHref, trigger, links, groups, promoTitle, promoText, panel, cols, promo, landmarkLabel. -#}\n{%- set v_label = (p.label ?? null) -%}\n{%- set v_brand = (p.brand ?? null) -%}\n{%- set v_brandHref = (p.brandHref ?? null) -%}\n{%- set v_trigger = (p.trigger ?? null) -%}\n{%- set v_links = (p.links ?? null) -%}\n{%- set v_groups = (p.groups ?? null) -%}\n{%- set v_promoTitle = (p.promoTitle ?? null) -%}\n{%- set v_promoText = (p.promoText ?? null) -%}\n{%- set v_panel = (p.panel ?? 'open') -%}\n{%- set v_cols = (p.cols ?? '3') -%}\n{%- set v_promo = (p.promo ?? 'none') -%}\n{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}\n{%- set c_7 -%}\n  {%- set c_6 -%}\n    {%- set c_1 -%}\n      {{ og_text(v_brand) }}\n    {%- endset -%}\n    {{ include('blocks/menu-entry.html.twig', {'p': {'href': v_brandHref, 'className': og_cnv(['text-lg font-medium']), 'testid': 'brand'}, 'children': og_markup(c_1)}, with_context = false) }}\n    {%- set c_5 -%}\n      {%- set c_4 -%}\n        {%- set c_2 -%}\n          {{ og_text(v_trigger) }}\n          {{ include('icons/LucideIcon.html.twig', {'name': 'chevron-down', 'size': 16}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/ButtonPlain.html.twig', {'type': 'button', 'class': 'inline-flex items-center gap-2 text-sm font-semibold', 'attrs': og_attrs(['aria-expanded', (og_t(og_eq(v_panel, 'open')) ? 'true' : 'false'), 'data-slot', 'mega-trigger']), 'children': c_2}, with_context = false) }}\n        {%- for v_l in og_l(v_links) %}\n          {%- set c_3 -%}\n            {{ og_text(og_get(v_l, ['name'])) }}\n          {%- endset -%}\n          {{ include('blocks/menu-entry.html.twig', {'p': {'href': og_get(v_l, ['href']), 'className': og_cnv(['text-sm']), 'current': og_eq(og_get(v_l, ['id']), ''), 'testid': 'nav-link'}, 'children': og_markup(c_3)}, with_context = false) }}\n        {%- endfor %}\n      {%- endset -%}\n      {{ include('compose/Group.html.twig', {'gap': '4', 'align': 'center', 'class': 'flex-wrap', 'children': c_4}, with_context = false) }}\n    {%- endset -%}\n    {{ include('blocks/nav-block.html.twig', {'p': {'label': (og_t(v_landmarkLabel) ? og_uniq(og_tpl('{0}, {1}', [v_label, v_landmarkLabel])) : v_label), 'className': og_cnv(['flex-1'])}, 'children': og_markup(c_5)}, with_context = false) }}\n  {%- endset -%}\n  {{ include('compose/Container.html.twig', {'class': og_s(og_cnv(['mx-auto w-full max-w-6xl px-4', 'flex flex-wrap items-center gap-6 py-4'])), 'attrs': og_attrs(['data-slot', 'container']), 'children': c_6}, with_context = false) }}\n{%- endset -%}\n{{ include('compose/Block.html.twig', {'tag': 'header', 'class': 'relative border-b border-border bg-background', 'attrs': og_attrs(['aria-label', v_landmarkLabel, 'data-slot', 'mega-menu']), 'children': c_7}, with_context = false) }}\n{%- if og_t(og_eq(v_panel, 'open')) %}\n  {%- set c_19 -%}\n    {%- set c_18 -%}\n      {%- if og_t(og_gt(og_len(v_groups), 0)) %}\n        {%- set c_14 -%}\n          {%- for v_g in og_l(v_groups) %}\n            {%- set c_13 -%}\n              {%- set c_9 -%}\n                {{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_g, ['icon'])), 'size': 16}, with_context = false) }}\n                {%- set c_8 -%}\n                  {{ og_text(og_get(v_g, ['title'])) }}\n                {%- endset -%}\n                {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_8}, with_context = false) }}\n              {%- endset -%}\n              {{ include('compose/Group.html.twig', {'gap': '2', 'align': 'center', 'children': c_9}, with_context = false) }}\n              {%- set c_12 -%}\n                {%- for v_item in og_l(og_get(v_g, ['links'])) %}\n                  {%- set c_11 -%}\n                    {%- set c_10 -%}\n                      {{ og_text(og_get(v_item, ['name'])) }}\n                    {%- endset -%}\n                    {{ include('blocks/menu-entry.html.twig', {'p': {'href': og_get(v_item, ['href']), 'className': og_cnv(['text-sm text-muted-foreground'])}, 'children': og_markup(c_10)}, with_context = false) }}\n                  {%- endset -%}\n                  {{ include('compose/ListItem.html.twig', {'attrs': og_attrs(['data-slot', 'links-row']), 'children': c_11}, with_context = false) }}\n                {%- endfor %}\n              {%- endset -%}\n              {{ include('compose/List.html.twig', {'class': 'm-0 flex list-none flex-col gap-2 p-0', 'children': c_12}, with_context = false) }}\n            {%- endset -%}\n            {{ include('compose/Stack.html.twig', {'gap': '2', 'attrs': og_attrs(['data-slot', 'item']), 'children': c_13}, with_context = false) }}\n          {%- endfor %}\n        {%- endset -%}\n        {{ include('compose/Grid.html.twig', {'cols': og_s((og_t(og_eq(v_cols, '2')) ? '1-2' : '1-3')), 'class': 'gap-6', 'attrs': og_attrs(['data-slot', 'items']), 'children': c_14}, with_context = false) }}\n      {%- endif %}\n      {%- if og_t(og_eq(v_promo, 'card')) %}\n        {%- set c_17 -%}\n          {{ include('blocks/media-frame.html.twig', {'p': {'alt': og_coalesce([v_promoTitle, '']), 'ratio': '4/3'}}, with_context = false) }}\n          {%- set c_15 -%}\n            {{ og_text(v_promoTitle) }}\n          {%- endset -%}\n          {{ include('compose/Text.html.twig', {'size': 'base', 'weight': 'semibold', 'children': c_15}, with_context = false) }}\n          {%- set c_16 -%}\n            {{ og_text(v_promoText) }}\n          {%- endset -%}\n          {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_16}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/Stack.html.twig', {'gap': '2', 'class': 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs': og_attrs(['data-slot', 'promo']), 'children': c_17}, 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', 'grid gap-8 py-6', (og_t(og_eq(v_promo, 'card')) ? 'md:grid-cols-[1fr_16rem]' : '')])), 'attrs': og_attrs(['data-slot', 'container']), 'children': c_18}, with_context = false) }}\n  {%- endset -%}\n  {{ include('compose/Box.html.twig', {'class': 'border-t border-border bg-card', 'attrs': og_attrs(['data-slot', 'mega-panel']), 'children': c_19}, with_context = false) }}\n{%- endif %}\n",
      "path": "blocks/mega-menu.html.twig",
      "target": "blocks/mega-menu.html.twig"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "navigation",
    "kind": "block",
    "tags": [
      "twig",
      "block"
    ]
  },
  "name": "mega-menu",
  "registryDependencies": [
    "block",
    "box",
    "button-plain",
    "container",
    "grid",
    "group",
    "list",
    "list-item",
    "lucide-icon",
    "media-frame",
    "menu-entry",
    "nav-block",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "twig",
  "title": "Mega Menu",
  "type": "registry:block"
}
