{
  "$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/**\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 */\nimport { Fragment, type ReactNode } from \"react\";\nimport { Badge, Box, Inline, List, ListItem, Stack, Text, Title } from \"../compose\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { MenuSectionNav } from \"../components/menu-section-nav\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { fmtMoney, tpl } from \"../utils\";\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\nexport function RestaurantMenu({\n  id,\n  title,\n  lead = \"\",\n  dishes,\n  sections,\n  empty = \"\",\n  labels,\n  cols = \"1\",\n  tone = \"default\",\n  landmarkLabel,\n}: RestaurantMenuProps) {\n  return (\n    <SectionFrame id={id} title={title} lead={lead} tone={tone} landmarkLabel={landmarkLabel}>\n      {((sections?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"star\" title={empty} />\n      ) : (\n        <Stack gap=\"8\" align=\"stretch\" className={(((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            className={\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            {(sections ?? []).map((s) => (\n              <Stack key={s.id} gap=\"4\" id={tpl(\"{0}-{1}\", id, s.key)} data-slot=\"menusection\">\n                <Stack gap=\"0\" className=\"border-b border-border pb-2\">\n                  <Title as={3} size=\"xl\" weight=\"bold\">\n                    {s.title}\n                  </Title>\n                  <Text size=\"sm\" className=\"text-muted-foreground\">\n                    {s.note}\n                  </Text>\n                </Stack>\n                <List tag=\"ul\" className=\"flex flex-col gap-4\">\n                  {(dishes ?? []).map((d) => (\n                    <Fragment key={d.id}>\n                      {(d.tag === s.key) ? (\n                        <ListItem className=\"flex flex-col gap-0\" data-slot=\"item\">\n                          <Box className=\"flex items-baseline gap-2\">\n                            <Inline className=\"font-semibold\">\n                              {d.name}\n                            </Inline>\n                            {d.badge ? (\n                              <Badge variant=\"outline\" size=\"sm\">\n                                {d.badge}\n                              </Badge>\n                            ) : null}\n                            <Inline className=\"flex-1 border-b border-dotted border-border\" aria-hidden=\"true\" />\n                            <Inline className=\"font-semibold\">\n                              {fmtMoney(d.price, d.currency)}\n                            </Inline>\n                          </Box>\n                          <Text size=\"sm\" className=\"text-muted-foreground\">\n                            {tpl(\"{0} · {1}\", d.summary, d.weight)}\n                          </Text>\n                        </ListItem>\n                      ) : null}\n                    </Fragment>\n                  ))}\n                </List>\n              </Stack>\n            ))}\n          </Box>\n        </Stack>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/restaurant-menu.tsx",
      "target": "blocks/restaurant-menu.tsx"
    },
    {
      "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"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "react",
      "block"
    ]
  },
  "name": "restaurant-menu",
  "registryDependencies": [
    "compose",
    "dish-showcase",
    "empty-state",
    "menu-section-nav",
    "section-frame",
    "utils"
  ],
  "runtime": "react",
  "title": "Restaurant Menu",
  "type": "registry:block"
}
