{
  "$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-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { DishSection } from \"./restaurant-menu.types\";\n  import type { Dish, FoodLabels } from \"./dish-showcase.types\";\n\n  export 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 lang=\"ts\">\n  import Badge from \"../compose/Badge.svelte\";\n  import Box from \"../compose/Box.svelte\";\n  import Inline from \"../compose/Inline.svelte\";\n  import List from \"../compose/List.svelte\";\n  import ListItem from \"../compose/ListItem.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import Title from \"../compose/Title.svelte\";\n  import EmptyState from \"../components/empty-state.svelte\";\n  import MenuSectionNav from \"../components/menu-section-nav.svelte\";\n  import SectionFrame from \"../components/section-frame.svelte\";\n  import { fmtMoney, tpl } from \"../utils\";\n\n  let {\n    id,\n    title,\n    lead = \"\",\n    dishes,\n    sections,\n    empty = \"\",\n    labels,\n    cols = \"1\",\n    tone = \"default\",\n    landmarkLabel,\n  }: RestaurantMenuProps = $props();\n</script>\n\n<SectionFrame id={id} title={title} lead={lead} tone={tone} landmarkLabel={landmarkLabel}>\n  {#if ((sections?.length ?? 0) === 0)}\n    <EmptyState icon=\"star\" title={empty} />\n  {:else}\n    <Stack 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        {#each sections as s (s.id)}\n          <Stack 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              {#each dishes as d (d.id)}\n                {#if (d.tag === s.key)}\n                  <ListItem 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                      {#if d.badge}\n                        <Badge variant=\"outline\" size=\"sm\">\n                          {d.badge}\n                        </Badge>\n                      {/if}\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                {/if}\n              {/each}\n            </List>\n          </Stack>\n        {/each}\n      </Box>\n    </Stack>\n  {/if}\n</SectionFrame>\n",
      "path": "blocks/restaurant-menu.svelte",
      "target": "blocks/restaurant-menu.svelte"
    },
    {
      "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": [
      "svelte",
      "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": "svelte",
  "title": "Restaurant Menu",
  "type": "registry:block"
}
