{
  "$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\" module>\n  import type { Snippet } from \"svelte\";\n  import type { Dish, FoodLabels } from \"./dish-showcase.types\";\n  import type { DishSection } from \"./restaurant-menu.types\";\n\n  export 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 lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Grid from \"../compose/Grid.svelte\";\n  import List from \"../compose/List.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import Title from \"../compose/Title.svelte\";\n  import DishCard from \"../blocks/dish-card.svelte\";\n  import EmptyState from \"../components/empty-state.svelte\";\n  import MenuRow from \"../components/menu-row.svelte\";\n  import MenuSectionNav from \"../components/menu-section-nav.svelte\";\n  import SectionFrame from \"../components/section-frame.svelte\";\n  import { tpl } from \"../utils\";\n\n  let {\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 = $props();\n</script>\n\n<SectionFrame id={id} title={title} lead={lead} density={density} landmarkLabel={landmarkLabel}>\n  {#if ((sections?.length ?? 0) === 0)}\n    <EmptyState icon=\"star\" title={empty} />\n  {:else}\n    <Stack gap=\"8\" align=\"stretch\">\n      {#if ((layout as string) === \"sections\")}\n        <MenuSectionNav label={labels.sections} sections={sections} prefix={id} landmarkLabel={landmarkLabel} />\n      {/if}\n      <Box class=\"flex flex-col gap-8\" data-slot=\"items\">\n        {#each sections as s (s.id)}\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            {#if ((layout as string) === \"grid\")}\n              <Grid cols=\"1-3\" class=\"gap-4\">\n                {#each dishes as d (d.id)}\n                  {#if (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                  {/if}\n                {/each}\n              </Grid>\n            {:else}\n              <List tag=\"ul\" class=\"flex flex-col\">\n                {#each dishes as d (d.id)}\n                  {#if (d.tag === s.key)}\n                    <MenuRow dish={d} prices={prices} />\n                  {/if}\n                {/each}\n              </List>\n            {/if}\n          </Stack>\n        {/each}\n      </Box>\n    </Stack>\n  {/if}\n</SectionFrame>\n",
      "path": "blocks/menu-board.svelte",
      "target": "blocks/menu-board.svelte"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "restaurant",
    "kind": "block",
    "tags": [
      "svelte",
      "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": "svelte",
  "title": "Menu Board",
  "type": "registry:block"
}
