{
  "$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{var $v_label = ($p['label'] ?? null)}\n{var $v_brand = ($p['brand'] ?? null)}\n{var $v_brandHref = ($p['brandHref'] ?? null)}\n{var $v_trigger = ($p['trigger'] ?? null)}\n{var $v_links = ($p['links'] ?? null)}\n{var $v_groups = ($p['groups'] ?? null)}\n{var $v_promoTitle = ($p['promoTitle'] ?? null)}\n{var $v_promoText = ($p['promoText'] ?? null)}\n{var $v_panel = ($p['panel'] ?? 'open')}\n{var $v_cols = ($p['cols'] ?? '3')}\n{var $v_promo = ($p['promo'] ?? 'none')}\n{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}\n{capture $c_7}\n  {capture $c_6}\n    {capture $c_1}\n      {=og_text($v_brand)}\n    {/capture}\n    {=og_include('blocks/menu-entry.latte', ['p' => ['href' => $v_brandHref, 'className' => og_cnv(['text-lg font-medium']), 'testid' => 'brand'], 'children' => og_markup($c_1)])|noescape}\n    {capture $c_5}\n      {capture $c_4}\n        {capture $c_2}\n          {=og_text($v_trigger)}\n          {=og_include('icons/LucideIcon.latte', ['name' => 'chevron-down', 'size' => 16])|noescape}\n        {/capture}\n        {=og_include('compose/ButtonPlain.latte', ['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' => (string) $c_2])|noescape}\n        {foreach og_l($v_links) as $v_l}\n          {capture $c_3}\n            {=og_text(og_get($v_l, ['name']))}\n          {/capture}\n          {=og_include('blocks/menu-entry.latte', ['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)])|noescape}\n        {/foreach}\n      {/capture}\n      {=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'center', 'class' => 'flex-wrap', 'children' => (string) $c_4])|noescape}\n    {/capture}\n    {=og_include('blocks/nav-block.latte', ['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)])|noescape}\n  {/capture}\n  {=og_include('compose/Container.latte', ['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' => (string) $c_6])|noescape}\n{/capture}\n{=og_include('compose/Block.latte', ['tag' => 'header', 'class' => 'relative border-b border-border bg-background', 'attrs' => og_attrs(['aria-label', $v_landmarkLabel, 'data-slot', 'mega-menu']), 'children' => (string) $c_7])|noescape}\n{if og_t(og_eq($v_panel, 'open'))}\n  {capture $c_19}\n    {capture $c_18}\n      {if og_t(og_gt(og_len($v_groups), 0))}\n        {capture $c_14}\n          {foreach og_l($v_groups) as $v_g}\n            {capture $c_13}\n              {capture $c_9}\n                {=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_g, ['icon'])), 'size' => 16])|noescape}\n                {capture $c_8}\n                  {=og_text(og_get($v_g, ['title']))}\n                {/capture}\n                {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_8])|noescape}\n              {/capture}\n              {=og_include('compose/Group.latte', ['gap' => '2', 'align' => 'center', 'children' => (string) $c_9])|noescape}\n              {capture $c_12}\n                {foreach og_l(og_get($v_g, ['links'])) as $v_item}\n                  {capture $c_11}\n                    {capture $c_10}\n                      {=og_text(og_get($v_item, ['name']))}\n                    {/capture}\n                    {=og_include('blocks/menu-entry.latte', ['p' => ['href' => og_get($v_item, ['href']), 'className' => og_cnv(['text-sm text-muted-foreground'])], 'children' => og_markup($c_10)])|noescape}\n                  {/capture}\n                  {=og_include('compose/ListItem.latte', ['attrs' => og_attrs(['data-slot', 'links-row']), 'children' => (string) $c_11])|noescape}\n                {/foreach}\n              {/capture}\n              {=og_include('compose/List.latte', ['class' => 'm-0 flex list-none flex-col gap-2 p-0', 'children' => (string) $c_12])|noescape}\n            {/capture}\n            {=og_include('compose/Stack.latte', ['gap' => '2', 'attrs' => og_attrs(['data-slot', 'item']), 'children' => (string) $c_13])|noescape}\n          {/foreach}\n        {/capture}\n        {=og_include('compose/Grid.latte', ['cols' => og_s((og_t(og_eq($v_cols, '2')) ? '1-2' : '1-3')), 'class' => 'gap-6', 'attrs' => og_attrs(['data-slot', 'items']), 'children' => (string) $c_14])|noescape}\n      {/if}\n      {if og_t(og_eq($v_promo, 'card'))}\n        {capture $c_17}\n          {=og_include('blocks/media-frame.latte', ['p' => ['alt' => og_coalesce([$v_promoTitle, '']), 'ratio' => '4/3']])|noescape}\n          {capture $c_15}\n            {=og_text($v_promoTitle)}\n          {/capture}\n          {=og_include('compose/Text.latte', ['size' => 'base', 'weight' => 'semibold', 'children' => (string) $c_15])|noescape}\n          {capture $c_16}\n            {=og_text($v_promoText)}\n          {/capture}\n          {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_16])|noescape}\n        {/capture}\n        {=og_include('compose/Stack.latte', ['gap' => '2', 'class' => 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs' => og_attrs(['data-slot', 'promo']), 'children' => (string) $c_17])|noescape}\n      {/if}\n    {/capture}\n    {=og_include('compose/Container.latte', ['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' => (string) $c_18])|noescape}\n  {/capture}\n  {=og_include('compose/Box.latte', ['class' => 'border-t border-border bg-card', 'attrs' => og_attrs(['data-slot', 'mega-panel']), 'children' => (string) $c_19])|noescape}\n{/if}\n",
      "path": "blocks/mega-menu.latte",
      "target": "blocks/mega-menu.latte"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "navigation",
    "kind": "block",
    "tags": [
      "latte",
      "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": "latte",
  "title": "Mega Menu",
  "type": "registry:block"
}
