{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Meal delivery as a week: one column per day with its meal.",
  "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  Meal delivery as a week: one column per day (its name and delivery note) with the meal of that day as a small\n  card (picture, name, weight, price). Axes: media (image, none), tone.\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 WeekMenuProps = {\n    id: string;\n    title: string;\n    lead?: string;\n    dishes: Dish[];\n    sections: DishSection[];\n    empty?: string;\n    labels: FoodLabels;\n    media?: \"image\" | \"none\";\n    tone?: \"default\" | \"muted\";\n    landmarkLabel?: string;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import Inline from \"../compose/Inline.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import EmptyState from \"../components/empty-state.svelte\";\n  import MediaFrame from \"../components/media-frame.svelte\";\n  import SectionFrame from \"../components/section-frame.svelte\";\n  import { fmtMoney } from \"../utils\";\n\n  let {\n    id,\n    title,\n    lead = \"\",\n    dishes,\n    sections,\n    empty = \"\",\n    labels,\n    media = \"image\",\n    tone = \"default\",\n    landmarkLabel,\n  }: WeekMenuProps = $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=\"calendar\" title={empty} />\n  {:else}\n    <Box class=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-5\" data-slot=\"items\">\n      {#each sections as s (s.id)}\n        <Stack gap=\"2\" class=\"border-t-2 border-primary pt-4\" data-slot=\"day\">\n          <Text size=\"sm\" weight=\"semibold\">\n            {s.title}\n          </Text>\n          <Text size=\"xs\" class=\"text-muted-foreground\">\n            {s.note}\n          </Text>\n          {#each dishes as d (d.id)}\n            {#if (d.tag === s.key)}\n              <Stack gap=\"2\" class=\"rounded bg-card inset-ring inset-ring-border p-4\" data-slot=\"item\">\n                {#if ((media as string) === \"image\")}\n                  <MediaFrame alt={d.name} src={d.image} ratio=\"4/3\" />\n                {/if}\n                <Text size=\"sm\" weight=\"semibold\">\n                  {d.name}\n                </Text>\n                <Group gap=\"2\" align=\"baseline\" justify=\"between\">\n                  <Text size=\"xs\" class=\"text-muted-foreground\">\n                    {d.weight}\n                  </Text>\n                  <Inline class=\"text-sm font-bold\">\n                    {fmtMoney(d.price, d.currency)}\n                  </Inline>\n                </Group>\n              </Stack>\n            {/if}\n          {/each}\n        </Stack>\n      {/each}\n    </Box>\n  {/if}\n</SectionFrame>\n",
      "path": "blocks/week-menu.svelte",
      "target": "blocks/week-menu.svelte"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "svelte",
      "block"
    ]
  },
  "name": "week-menu",
  "registryDependencies": [
    "box",
    "dish-showcase",
    "empty-state",
    "group",
    "inline",
    "media-frame",
    "restaurant-menu",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Week Menu",
  "type": "registry:block"
}
