{
  "$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 = og_def(p['label'], none) -%}\n{%- set v_brand = og_def(p['brand'], none) -%}\n{%- set v_brandHref = og_def(p['brandHref'], none) -%}\n{%- set v_trigger = og_def(p['trigger'], none) -%}\n{%- set v_links = og_def(p['links'], none) -%}\n{%- set v_groups = og_def(p['groups'], none) -%}\n{%- set v_promoTitle = og_def(p['promoTitle'], none) -%}\n{%- set v_promoText = og_def(p['promoText'], none) -%}\n{%- set v_panel = og_def(p['panel'], 'open') -%}\n{%- set v_cols = og_def(p['cols'], '3') -%}\n{%- set v_promo = og_def(p['promo'], 'none') -%}\n{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}\n{%- set c_7 -%}\n  {%- set c_6 -%}\n    {%- set c_1 -%}\n      {{ og_text(v_brand) }}\n    {%- endset -%}\n    {{ og_include('blocks/menu-entry.html.j2', {'p': {'href': v_brandHref, 'className': og_cnv(['text-lg font-medium']), 'testid': 'brand'}, 'children': og_markup(c_1)}) }}\n    {%- set c_5 -%}\n      {%- set c_4 -%}\n        {%- set c_2 -%}\n          {{ og_text(v_trigger) }}\n          {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': 'chevron-down', 'Size': 16}}) }}\n        {%- endset -%}\n        {{ og_include('compose/button-plain.html.j2', {'p': {'Type': 'button', 'Class': 'inline-flex items-center gap-2 text-sm font-semibold', 'Attrs': og_attrs(['aria-expanded', ('true' if og_t(og_eq(v_panel, 'open')) else 'false'), 'data-slot', 'mega-trigger'])}, 'children': c_2}) }}\n        {%- for v_l in og_l(v_links) %}\n          {%- set c_3 -%}\n            {{ og_text(og_get(v_l, ['name'])) }}\n          {%- endset -%}\n          {{ og_include('blocks/menu-entry.html.j2', {'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)}) }}\n        {%- endfor %}\n      {%- endset -%}\n      {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Class': 'flex-wrap'}, 'children': c_4}) }}\n    {%- endset -%}\n    {{ og_include('blocks/nav-block.html.j2', {'p': {'label': (og_uniq(og_tpl('{0}, {1}', [v_label, v_landmarkLabel])) if og_t(v_landmarkLabel) else v_label), 'className': og_cnv(['flex-1'])}, 'children': og_markup(c_5)}) }}\n  {%- endset -%}\n  {{ og_include('compose/container.html.j2', {'p': {'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}) }}\n{%- endset -%}\n{{ og_include('compose/block.html.j2', {'p': {'Tag': 'header', 'Class': 'relative border-b border-border bg-background', 'Attrs': og_attrs(['aria-label', v_landmarkLabel, 'data-slot', 'mega-menu'])}, 'children': c_7}) }}\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                {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_g, ['icon'])), 'Size': 16}}) }}\n                {%- set c_8 -%}\n                  {{ og_text(og_get(v_g, ['title'])) }}\n                {%- endset -%}\n                {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_8}) }}\n              {%- endset -%}\n              {{ og_include('compose/group.html.j2', {'p': {'Gap': '2', 'Align': 'center'}, 'children': c_9}) }}\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                    {{ og_include('blocks/menu-entry.html.j2', {'p': {'href': og_get(v_item, ['href']), 'className': og_cnv(['text-sm text-muted-foreground'])}, 'children': og_markup(c_10)}) }}\n                  {%- endset -%}\n                  {{ og_include('compose/list-item.html.j2', {'p': {'Attrs': og_attrs(['data-slot', 'links-row'])}, 'children': c_11}) }}\n                {%- endfor %}\n              {%- endset -%}\n              {{ og_include('compose/list.html.j2', {'p': {'Class': 'm-0 flex list-none flex-col gap-2 p-0'}, 'children': c_12}) }}\n            {%- endset -%}\n            {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Attrs': og_attrs(['data-slot', 'item'])}, 'children': c_13}) }}\n          {%- endfor %}\n        {%- endset -%}\n        {{ og_include('compose/grid.html.j2', {'p': {'Cols': og_s(('1-2' if og_t(og_eq(v_cols, '2')) else '1-3')), 'Class': 'gap-6', 'Attrs': og_attrs(['data-slot', 'items'])}, 'children': c_14}) }}\n      {%- endif %}\n      {%- if og_t(og_eq(v_promo, 'card')) %}\n        {%- set c_17 -%}\n          {{ og_include('blocks/media-frame.html.j2', {'p': {'alt': og_coalesce([v_promoTitle, '']), 'ratio': '4/3'}}) }}\n          {%- set c_15 -%}\n            {{ og_text(v_promoTitle) }}\n          {%- endset -%}\n          {{ og_include('compose/text.html.j2', {'p': {'Size': 'base', 'Weight': 'semibold'}, 'children': c_15}) }}\n          {%- set c_16 -%}\n            {{ og_text(v_promoText) }}\n          {%- endset -%}\n          {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_16}) }}\n        {%- endset -%}\n        {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Class': 'rounded bg-card inset-ring inset-ring-border p-4', 'Attrs': og_attrs(['data-slot', 'promo'])}, 'children': c_17}) }}\n      {%- endif %}\n    {%- endset -%}\n    {{ og_include('compose/container.html.j2', {'p': {'Class': og_s(og_cnv(['mx-auto w-full max-w-6xl px-4', 'grid gap-8 py-6', ('md:grid-cols-[1fr_16rem]' if og_t(og_eq(v_promo, 'card')) else '')])), 'Attrs': og_attrs(['data-slot', 'container'])}, 'children': c_18}) }}\n  {%- endset -%}\n  {{ og_include('compose/box.html.j2', {'p': {'Class': 'border-t border-border bg-card', 'Attrs': og_attrs(['data-slot', 'mega-panel'])}, 'children': c_19}) }}\n{%- endif %}\n",
      "path": "blocks/mega-menu.html.j2",
      "target": "blocks/mega-menu.html.j2"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "navigation",
    "kind": "block",
    "tags": [
      "jinja2",
      "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": "jinja2",
  "title": "Mega Menu",
  "type": "registry:block"
}
