{
  "$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-->\n<script lang=\"ts\">\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</script>\n\n<script setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Grid from \"../compose/Grid.vue\";\nimport List from \"../compose/List.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Text from \"../compose/Text.vue\";\nimport Title from \"../compose/Title.vue\";\nimport DishCard from \"../blocks/dish-card.vue\";\nimport EmptyState from \"../components/empty-state.vue\";\nimport MenuRow from \"../components/menu-row.vue\";\nimport MenuSectionNav from \"../components/menu-section-nav.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport { tpl } from \"../utils\";\n\nconst {\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} = defineProps<MenuBoardProps>();\n</script>\n\n<template>\n  <SectionFrame :id=\"id\" :title=\"title\" :lead=\"lead\" :density=\"density\" :landmarkLabel=\"landmarkLabel\">\n    <EmptyState v-if=\"((sections?.length ?? 0) === 0)\" icon=\"star\" :title=\"empty\" />\n    <Stack v-else gap=\"8\" align=\"stretch\">\n      <MenuSectionNav\n        v-if=\"((layout as string) === 'sections')\"\n        :label=\"labels.sections\"\n        :sections=\"sections\"\n        :prefix=\"id\"\n        :landmarkLabel=\"landmarkLabel\"\n      />\n      <Box class=\"flex flex-col gap-8\" data-slot=\"items\">\n        <Stack v-for=\"s in sections\" :key=\"s.id\"\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          <Grid v-if=\"((layout as string) === 'grid')\" cols=\"1-3\" class=\"gap-4\">\n            <template v-for=\"d in dishes\" :key=\"d.id\">\n              <DishCard v-if=\"(d.tag === s.key)\"\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            </template>\n          </Grid>\n          <List v-else tag=\"ul\" class=\"flex flex-col\">\n            <template v-for=\"d in dishes\" :key=\"d.id\">\n              <MenuRow v-if=\"(d.tag === s.key)\" :dish=\"d\" :prices=\"prices\" />\n            </template>\n          </List>\n        </Stack>\n      </Box>\n    </Stack>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/menu-board.vue",
      "target": "blocks/menu-board.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "restaurant",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "menu-board",
  "registryDependencies": [
    "box",
    "dish-card",
    "dish-showcase",
    "empty-state",
    "grid",
    "list",
    "menu-row",
    "menu-section-nav",
    "restaurant-menu",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "vue",
  "title": "Menu Board",
  "type": "registry:block"
}
