{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Kits with the ingredients list, the cooking time and the portions.",
  "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  Recipe kits delivered home: a picture beside the kit name, cooking time, the ingredients list, a portions\n  radio group and the price with an add button. Axes: layout (rows, cards), 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 RecipeKitsProps = {\n  id: string;\n  title: string;\n  lead?: string;\n  dishes: Dish[];\n  empty?: string;\n  labels: FoodLabels;\n  portions: DishOption[];\n  layout?: \"rows\" | \"cards\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Badge from \"../compose/Badge.vue\";\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 List from \"../compose/List.vue\";\nimport ListItem from \"../compose/ListItem.vue\";\nimport LucideIcon from \"../icons/LucideIcon.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  portions,\n  layout = \"rows\",\n  tone = \"default\",\n  landmarkLabel,\n} = defineProps<RecipeKitsProps>();\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=\"package\" :title=\"empty\" />\n    <Box v-else\n      :class=\"\n        (layout as string) === 'cards' ? 'grid grid-cols-1 gap-8 md:grid-cols-3'\n        : 'flex flex-col gap-8'\n      \"\n      data-slot=\"items\"\n    >\n      <Box v-for=\"d in dishes\" :key=\"d.id\"\n        :class=\"\n          (layout as string) === 'cards' ? 'rounded bg-card inset-ring inset-ring-border flex flex-col gap-4 p-4'\n          : 'rounded bg-card inset-ring inset-ring-border grid grid-cols-1 gap-8 p-6 md:grid-cols-2'\n        \"\n        data-slot=\"item\"\n      >\n        <MediaFrame :alt=\"d.name\" :src=\"d.image\" ratio=\"4/3\" />\n        <Stack gap=\"4\">\n          <Group gap=\"2\" class=\"flex-wrap\">\n            <Badge variant=\"secondary\" size=\"default\">\n              <LucideIcon name=\"timer\" :size=\"16\" />\n              {{ tpl(labels.minutes, (d.minutes == null ? undefined : String(d.minutes))) }}\n            </Badge>\n            <Badge v-if=\"d.badge\" variant=\"outline\" size=\"default\">\n              {{ d.badge }}\n            </Badge>\n          </Group>\n          <Stack gap=\"2\">\n            <Text size=\"xl\" weight=\"semibold\">\n              {{ d.name }}\n            </Text>\n            <Text size=\"sm\" class=\"text-muted-foreground\">\n              {{ d.summary }}\n            </Text>\n          </Stack>\n          <Stack gap=\"2\">\n            <Text size=\"sm\" weight=\"semibold\">\n              {{ labels.ingredients }}\n            </Text>\n            <List tag=\"ul\" class=\"grid grid-cols-1 gap-2 text-sm sm:grid-cols-2\" data-slot=\"ingredients\">\n              <ListItem v-for=\"x in d.items\" :key=\"x\" class=\"flex items-center gap-2\" data-slot=\"items-row\">\n                <LucideIcon name=\"check\" :size=\"16\" class=\"text-primary\" />\n                <Inline>\n                  {{ x }}\n                </Inline>\n              </ListItem>\n            </List>\n          </Stack>\n          <OptionChips :name=\"tpl('{0}-portions-{1}', id, d.id)\" :legend=\"labels.portions\" :options=\"portions\" />\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/recipe-kits.vue",
      "target": "blocks/recipe-kits.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "recipe-kits",
  "registryDependencies": [
    "badge",
    "box",
    "button",
    "dish-showcase",
    "empty-state",
    "group",
    "inline",
    "list",
    "list-item",
    "lucide-icon",
    "media-frame",
    "option-chips",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "vue",
  "title": "Recipe Kits",
  "type": "registry:block"
}
