{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Pizza cards with a size and a crust radio group and an add button.",
  "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  Pizzas with a picker on each card: the picture, name and toppings, a radio group of sizes and one of crusts\n  (each a fieldset with role radiogroup), the price and an add button. Axes: layout (cards, rows), 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 { DishOption } from \"../components/option-chips.types\";\n\n  export type PizzaPickerProps = {\n    id: string;\n    title: string;\n    lead?: string;\n    dishes: Dish[];\n    empty?: string;\n    labels: FoodLabels;\n    sizes: DishOption[];\n    crusts: DishOption[];\n    layout?: \"cards\" | \"rows\";\n    tone?: \"default\" | \"muted\";\n    landmarkLabel?: string;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Button from \"../compose/Button.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 OptionChips from \"../components/option-chips.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    empty = \"\",\n    labels,\n    sizes,\n    crusts,\n    layout = \"cards\",\n    tone = \"default\",\n    landmarkLabel,\n  }: PizzaPickerProps = $props();\n</script>\n\n<SectionFrame id={id} title={title} lead={lead} tone={tone} landmarkLabel={landmarkLabel}>\n  {#if ((dishes?.length ?? 0) === 0)}\n    <EmptyState icon=\"star\" title={empty} />\n  {:else}\n    <Box\n      class={\n        (layout as string) === \"rows\" ? \"flex flex-col gap-4\"\n        : \"grid grid-cols-1 gap-4 md:grid-cols-3\"\n      }\n      data-slot=\"items\"\n    >\n      {#each dishes as d (d.id)}\n        <Box\n          class={\n            (layout as string) === \"rows\" ? \"rounded bg-card inset-ring inset-ring-border grid grid-cols-1 gap-4 p-4 md:grid-cols-3\"\n            : \"rounded bg-card inset-ring inset-ring-border flex flex-col gap-4 p-4\"\n          }\n          data-slot=\"item\"\n        >\n          <MediaFrame alt={d.name} src={d.image} ratio=\"1/1\" />\n          <Stack gap=\"4\" class={(((layout as string) === \"rows\") ? \"md:col-span-2\" : \"\")}>\n            <Stack gap=\"2\">\n              <Text size=\"lg\" weight=\"semibold\">\n                {d.name}\n              </Text>\n              <Text size=\"sm\" class=\"text-muted-foreground\">\n                {d.summary}\n              </Text>\n            </Stack>\n            <OptionChips name={tpl(\"{0}-size-{1}\", id, d.id)} legend={labels.size} options={sizes} />\n            <OptionChips name={tpl(\"{0}-crust-{1}\", id, d.id)} legend={labels.crust} options={crusts} />\n            <Group gap=\"4\" align=\"center\" justify=\"between\" class=\"mt-auto\">\n              <Inline class=\"text-xl font-bold\">\n                {fmtMoney(d.price, d.currency)}\n              </Inline>\n              <Button variant=\"default\" size=\"default\" type=\"button\" aria-label={tpl(labels.addOf, d.name)}>\n                {labels.add}\n              </Button>\n            </Group>\n          </Stack>\n        </Box>\n      {/each}\n    </Box>\n  {/if}\n</SectionFrame>\n",
      "path": "blocks/pizza-picker.svelte",
      "target": "blocks/pizza-picker.svelte"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "svelte",
      "block"
    ]
  },
  "name": "pizza-picker",
  "registryDependencies": [
    "box",
    "button",
    "dish-showcase",
    "empty-state",
    "group",
    "inline",
    "media-frame",
    "option-chips",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Pizza Picker",
  "type": "registry:block"
}
