{
  "$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 */\nimport { For, type JSX } from \"solid-js\";\nimport { Badge, Box, Button, Group, Inline, List, ListItem, Stack, Text } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { MediaFrame } from \"../components/media-frame\";\nimport { OptionChips } from \"../components/option-chips\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { fmtMoney, tpl } from \"../utils\";\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\nexport function RecipeKits({\n  id,\n  title,\n  lead = \"\",\n  dishes,\n  empty = \"\",\n  labels,\n  portions,\n  layout = \"rows\",\n  tone = \"default\",\n  landmarkLabel,\n}: RecipeKitsProps) {\n  return (\n    <SectionFrame id={id} title={title} lead={lead} tone={tone} landmarkLabel={landmarkLabel}>\n      {((dishes?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"package\" title={empty} />\n      ) : (\n        <Box\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          <For each={dishes ?? []}>{(d) => (\n            <Box\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                  {d.badge ? (\n                    <Badge variant=\"outline\" size=\"default\">\n                      {d.badge}\n                    </Badge>\n                  ) : null}\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                    <For each={d.items ?? []}>{(x) => (\n                      <ListItem 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                    )}</For>\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          )}</For>\n        </Box>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/recipe-kits.tsx",
      "target": "blocks/recipe-kits.tsx"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "food",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "recipe-kits",
  "registryDependencies": [
    "compose",
    "dish-showcase",
    "empty-state",
    "lucide-icon",
    "media-frame",
    "option-chips",
    "section-frame",
    "utils"
  ],
  "runtime": "solid",
  "title": "Recipe Kits",
  "type": "registry:block"
}
