{
  "$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\">\nimport type { Dish, FoodLabels } from \"./dish-showcase.types\";\nimport type { DishOption } from \"../components/option-chips.types\";\n\nexport 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 setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Button from \"../compose/Button.vue\";\nimport Group from \"../compose/Group.vue\";\nimport Inline from \"../compose/Inline.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Text from \"../compose/Text.vue\";\nimport EmptyState from \"../components/empty-state.vue\";\nimport MediaFrame from \"../components/media-frame.vue\";\nimport OptionChips from \"../components/option-chips.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport { fmtMoney, tpl } from \"../utils\";\n\nconst {\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} = defineProps<PizzaPickerProps>();\n</script>\n\n<template>\n  <SectionFrame :id=\"id\" :title=\"title\" :lead=\"lead\" :tone=\"tone\" :landmarkLabel=\"landmarkLabel\">\n    <EmptyState v-if=\"((dishes?.length ?? 0) === 0)\" icon=\"star\" :title=\"empty\" />\n    <Box v-else\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      <Box v-for=\"d in dishes\" :key=\"d.id\"\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    </Box>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/pizza-picker.vue",
      "target": "blocks/pizza-picker.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "pizza-picker",
  "registryDependencies": [
    "box",
    "button",
    "dish-showcase",
    "empty-state",
    "group",
    "inline",
    "media-frame",
    "option-chips",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "vue",
  "title": "Pizza Picker",
  "type": "registry:block"
}
