{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Category sections with DishCards in a grid, or denser menu rows; prices can be hidden.",
  "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 restaurant menu board: category sections with DishCards in a grid, or denser menu rows in a list or a\n * sectioned column. Axes: layout (sections, grid, list), prices (show, hide), density. Composes DishCard;\n * section rows use MenuRow.\n */\nimport { For, type JSX } from \"solid-js\";\nimport { Box, Grid, List, Stack, Text, Title } from \"../compose\";\nimport { DishCard } from \"../blocks/dish-card\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { MenuRow } from \"../components/menu-row\";\nimport { MenuSectionNav } from \"../components/menu-section-nav\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { tpl } from \"../utils\";\nimport type { Dish, FoodLabels } from \"./dish-showcase.types\";\nimport type { DishSection } from \"./restaurant-menu.types\";\n\nexport type MenuBoardProps = {\n  id: string;\n  title: string;\n  lead?: string;\n  dishes: Dish[];\n  sections: DishSection[];\n  empty?: string;\n  labels: FoodLabels;\n  layout?: \"sections\" | \"grid\" | \"list\";\n  prices?: \"show\" | \"hide\";\n  density?: \"default\" | \"compact\";\n  landmarkLabel?: string;\n};\n\nexport function MenuBoard({\n  id,\n  title,\n  lead = \"\",\n  dishes,\n  sections,\n  empty = \"\",\n  labels,\n  layout = \"sections\",\n  prices = \"show\",\n  density = \"default\",\n  landmarkLabel,\n}: MenuBoardProps) {\n  return (\n    <SectionFrame id={id} title={title} lead={lead} density={density} landmarkLabel={landmarkLabel}>\n      {((sections?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"star\" title={empty} />\n      ) : (\n        <Stack gap=\"8\" align=\"stretch\">\n          {((layout as string) === \"sections\") ? (\n            <MenuSectionNav label={labels.sections} sections={sections} prefix={id} landmarkLabel={landmarkLabel} />\n          ) : null}\n          <Box class=\"flex flex-col gap-8\" data-slot=\"items\">\n            <For each={sections ?? []}>{(s) => (\n              <Stack\n                gap={(((density as string) === \"compact\") ? \"2\" : \"4\")}\n                id={tpl(\"{0}-{1}\", id, s.key)}\n                data-slot=\"menusection\"\n              >\n                <Stack gap=\"0\" class=\"border-b border-border pb-2\">\n                  <Title as={3} size=\"xl\" weight=\"bold\">\n                    {s.title}\n                  </Title>\n                  <Text size=\"sm\" class=\"text-muted-foreground\">\n                    {s.note}\n                  </Text>\n                </Stack>\n                {((layout as string) === \"grid\") ? (\n                  <Grid cols=\"1-3\" class=\"gap-4\">\n                    <For each={dishes ?? []}>{(d) => (\n                      <>\n                        {(d.tag === s.key) ? (\n                          <DishCard\n                            dish={d}\n                            labels={{ add: labels.add }}\n                            media={(((density as string) === \"compact\") ? \"none\" : \"image\")}\n                            prices={prices}\n                            action=\"none\"\n                            density={density}\n                          />\n                        ) : null}\n                      </>\n                    )}</For>\n                  </Grid>\n                ) : (\n                  <List tag=\"ul\" class=\"flex flex-col\">\n                    <For each={dishes ?? []}>{(d) => (\n                      <>\n                        {(d.tag === s.key) ? (\n                          <MenuRow dish={d} prices={prices} />\n                        ) : null}\n                      </>\n                    )}</For>\n                  </List>\n                )}\n              </Stack>\n            )}</For>\n          </Box>\n        </Stack>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/menu-board.tsx",
      "target": "blocks/menu-board.tsx"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "restaurant",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "menu-board",
  "registryDependencies": [
    "compose",
    "dish-card",
    "dish-showcase",
    "empty-state",
    "menu-row",
    "menu-section-nav",
    "restaurant-menu",
    "section-frame",
    "utils"
  ],
  "runtime": "solid",
  "title": "Menu Board",
  "type": "registry:block"
}
