{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Menu sections with dotted leaders to the price; no cart.",
  "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\nexport type DishSection = {\n  id: string;\n  key: string;\n  title: string;\n  note: string;\n};\n",
      "path": "blocks/restaurant-menu.types.ts",
      "target": "blocks/restaurant-menu.types.ts"
    },
    {
      "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 by sections: a nav of section links, then each section (heading and note) with its dishes as\n  menu lines (name, a dotted leader, the price; the summary and weight below). No cart. Axes: cols (1, 2), tone.\n-->\n<script lang=\"ts\">\nimport type { DishSection } from \"./restaurant-menu.types\";\nimport type { Dish, FoodLabels } from \"./dish-showcase.types\";\n\nexport type RestaurantMenuProps = {\n  id: string;\n  title: string;\n  lead?: string;\n  dishes: Dish[];\n  sections: DishSection[];\n  empty?: string;\n  labels: FoodLabels;\n  cols?: \"1\" | \"2\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Badge from \"../compose/Badge.vue\";\nimport Box from \"../compose/Box.vue\";\nimport Inline from \"../compose/Inline.vue\";\nimport List from \"../compose/List.vue\";\nimport ListItem from \"../compose/ListItem.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Text from \"../compose/Text.vue\";\nimport Title from \"../compose/Title.vue\";\nimport EmptyState from \"../components/empty-state.vue\";\nimport MenuSectionNav from \"../components/menu-section-nav.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport { fmtMoney, tpl } from \"../utils\";\n\nconst {\n  id,\n  title,\n  lead = \"\",\n  dishes,\n  sections,\n  empty = \"\",\n  labels,\n  cols = \"1\",\n  tone = \"default\",\n  landmarkLabel,\n} = defineProps<RestaurantMenuProps>();\n</script>\n\n<template>\n  <SectionFrame :id=\"id\" :title=\"title\" :lead=\"lead\" :tone=\"tone\" :landmarkLabel=\"landmarkLabel\">\n    <EmptyState v-if=\"((sections?.length ?? 0) === 0)\" icon=\"star\" :title=\"empty\" />\n    <Stack v-else gap=\"8\" align=\"stretch\" :class=\"(((cols as string) === '1') ? 'mx-auto w-full max-w-3xl' : '')\">\n      <MenuSectionNav :label=\"labels.sections\" :sections=\"sections\" :prefix=\"id\" :landmarkLabel=\"landmarkLabel\" />\n      <Box\n        :class=\"\n          (cols as string) === '2' ? 'grid grid-cols-1 gap-8 md:grid-cols-2'\n          : 'flex flex-col gap-8'\n        \"\n        data-slot=\"items\"\n      >\n        <Stack v-for=\"s in sections\" :key=\"s.id\" gap=\"4\" :id=\"tpl('{0}-{1}', id, s.key)\" data-slot=\"menusection\">\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          <List tag=\"ul\" class=\"flex flex-col gap-4\">\n            <template v-for=\"d in dishes\" :key=\"d.id\">\n              <ListItem v-if=\"(d.tag === s.key)\" class=\"flex flex-col gap-0\" data-slot=\"item\">\n                <Box class=\"flex items-baseline gap-2\">\n                  <Inline class=\"font-semibold\">\n                    {{ d.name }}\n                  </Inline>\n                  <Badge v-if=\"d.badge\" variant=\"outline\" size=\"sm\">\n                    {{ d.badge }}\n                  </Badge>\n                  <Inline class=\"flex-1 border-b border-dotted border-border\" aria-hidden=\"true\" />\n                  <Inline class=\"font-semibold\">\n                    {{ fmtMoney(d.price, d.currency) }}\n                  </Inline>\n                </Box>\n                <Text size=\"sm\" class=\"text-muted-foreground\">\n                  {{ tpl(\"{0} · {1}\", d.summary, d.weight) }}\n                </Text>\n              </ListItem>\n            </template>\n          </List>\n        </Stack>\n      </Box>\n    </Stack>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/restaurant-menu.vue",
      "target": "blocks/restaurant-menu.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "restaurant-menu",
  "registryDependencies": [
    "badge",
    "box",
    "dish-showcase",
    "empty-state",
    "inline",
    "list",
    "list-item",
    "menu-section-nav",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "vue",
  "title": "Restaurant Menu",
  "type": "registry:block"
}
