{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "How delivery works: the facts, then the zones.",
  "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 * How delivery works: the facts as icon cards, then the zones with their time and the order that ships free.\n * Axes: layout (full: facts over zone cards, facts: the facts only, split: the facts beside a list of zones),\n * tone, density.\n */\nimport { type ReactNode } from \"react\";\nimport { Badge, Box, Grid, Group, Stack, Text, Title } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { cn, fmtMoney, tpl } from \"../utils\";\nimport type { DeliveryLabels } from \"./delivery-info.types\";\nimport type { Feature } from \"./feature-grid.types\";\nimport type { Zone } from \"./zone-table.types\";\n\nexport type DeliveryInfoProps = {\n  id: string;\n  title: string;\n  lead?: string;\n  facts: Feature[];\n  zones: Zone[];\n  labels: DeliveryLabels;\n  layout?: \"full\" | \"facts\" | \"split\";\n  tone?: \"default\" | \"muted\";\n  density?: \"default\" | \"compact\";\n  landmarkLabel?: string;\n};\n\nexport function DeliveryInfo({\n  id,\n  title,\n  lead = \"\",\n  facts,\n  zones,\n  labels,\n  layout = \"full\",\n  tone = \"default\",\n  density = \"default\",\n  landmarkLabel,\n}: DeliveryInfoProps) {\n  return (\n    <SectionFrame id={id} title={title} lead={lead} tone={tone} density={density} landmarkLabel={landmarkLabel}>\n      <Box\n        className={cn(\n          \"grid grid-cols-1 gap-8\",\n          (((layout as string) === \"split\") ? \"items-start md:grid-cols-2\" : \"\")\n        )}\n      >\n        {((facts?.length ?? 0) > 0) ? (\n          <Grid cols={(((layout as string) === \"split\") ? \"1-2\" : \"1-4\")} className=\"gap-4\" data-slot=\"facts\">\n            {(facts ?? []).map((f) => (\n              <Stack key={f.id} gap=\"4\" className=\"rounded bg-card inset-ring inset-ring-border p-6\" data-slot=\"fact\">\n                <Box className=\"flex size-10 shrink-0 items-center justify-center rounded bg-muted\">\n                  <LucideIcon name={f.icon} size={20} />\n                </Box>\n                <Stack gap=\"2\">\n                  <Text size=\"sm\" weight=\"semibold\">\n                    {f.title}\n                  </Text>\n                  <Text size=\"sm\" className=\"text-muted-foreground\">\n                    {f.text}\n                  </Text>\n                </Stack>\n              </Stack>\n            ))}\n          </Grid>\n        ) : null}\n        {(((layout as string) !== \"facts\") && ((zones?.length ?? 0) > 0)) ? (\n          <Stack gap=\"4\" align=\"stretch\">\n            <Title as={3} size=\"lg\" weight=\"bold\">\n              {labels.zones}\n            </Title>\n            <Box\n              className={\n                (layout as string) === \"split\" ? \"flex flex-col gap-4\"\n                : \"grid grid-cols-1 gap-4 md:grid-cols-3\"\n              }\n            >\n              {(zones ?? []).map((z) => (\n                <Stack key={z.id}\n                  gap=\"2\"\n                  className={\n                    (layout as string) === \"split\" ? \"border-b border-border pb-4\"\n                    : \"rounded bg-card inset-ring inset-ring-border p-6\"\n                  }\n                  data-slot=\"zone\"\n                >\n                  <Group gap=\"4\" align=\"baseline\" justify=\"between\">\n                    <Text size=\"sm\" weight=\"semibold\">\n                      {z.name}\n                    </Text>\n                    <Badge variant=\"secondary\" size=\"default\">\n                      {z.time}\n                    </Badge>\n                  </Group>\n                  <Text size=\"sm\" className=\"text-muted-foreground\">\n                    {z.area}\n                  </Text>\n                  <Text size=\"sm\" weight=\"medium\">\n                    {tpl(labels.freeFrom, fmtMoney(z.freeFrom, z.currency))}\n                  </Text>\n                </Stack>\n              ))}\n            </Box>\n          </Stack>\n        ) : null}\n      </Box>\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/delivery-info.tsx",
      "target": "blocks/delivery-info.tsx"
    },
    {
      "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\nexport type DeliveryLabels = {\n  zones: string;\n  freeFrom: string;\n};\n",
      "path": "blocks/delivery-info.types.ts",
      "target": "blocks/delivery-info.types.ts"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "delivery",
    "kind": "block",
    "tags": [
      "react",
      "block"
    ]
  },
  "name": "delivery-info",
  "registryDependencies": [
    "compose",
    "feature-grid",
    "lucide-icon",
    "section-frame",
    "utils",
    "zone-table"
  ],
  "runtime": "react",
  "title": "Delivery Info",
  "type": "registry:block"
}
