{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Subtotal, shipping, tax and the total.",
  "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 * The totals of an order: subtotal, shipping, tax and the total, with a checkout button and a note. Axes: layout\n * (card, plain), cta (show, hide), note (show, hide), density, tone.\n */\nimport { For, type JSX } from \"solid-js\";\nimport { Box, Button, Inline, List, ListItem, Stack, Text } from \"../compose\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { cn, fmtMoney } from \"../utils\";\nimport type { SummaryRow, SummaryLabels } from \"./order-summary.types\";\n\nexport type OrderSummaryProps = {\n  id: string;\n  title: string;\n  rows: SummaryRow[];\n  empty?: string;\n  labels: SummaryLabels;\n  layout?: \"card\" | \"plain\";\n  cta?: \"show\" | \"hide\";\n  note?: \"show\" | \"hide\";\n  tone?: \"default\" | \"muted\";\n  density?: \"default\" | \"compact\";\n  landmarkLabel?: string;\n};\n\nexport function OrderSummary({\n  id,\n  title,\n  rows,\n  empty = \"\",\n  labels,\n  layout = \"card\",\n  cta = \"show\",\n  note = \"show\",\n  tone = \"default\",\n  density = \"default\",\n  landmarkLabel,\n}: OrderSummaryProps) {\n  return (\n    <SectionFrame id={id} title={title} tone={tone} density={density} measure=\"md\" landmarkLabel={landmarkLabel}>\n      {((rows?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"receipt\" title={empty} />\n      ) : (\n        <Box\n          class={cn(\n            (((layout as string) === \"card\") ? \"rounded bg-card p-6 inset-ring inset-ring-border\" : \"\")\n          )}\n          data-slot=\"summary\"\n        >\n          <Stack gap=\"4\" align=\"stretch\">\n            <List tag=\"ul\" class=\"flex flex-col gap-4\">\n              <For each={rows ?? []}>{(row) => (\n                <ListItem\n                  class={cn(\n                    \"flex items-center justify-between gap-4\",\n                    (\n                      row.strong ? \"border-t border-border pt-4 text-base font-bold\"\n                      : \"text-sm text-muted-foreground\"\n                    )\n                  )}\n                  data-slot=\"item\"\n                >\n                  <Inline>\n                    {row.label}\n                  </Inline>\n                  <Inline>\n                    {fmtMoney(row.amount, row.currency)}\n                  </Inline>\n                </ListItem>\n              )}</For>\n            </List>\n            {((cta as string) === \"show\") ? (\n              <Button variant=\"default\" size=\"default\" class=\"w-full\">\n                {labels.checkout}\n              </Button>\n            ) : null}\n            {((note as string) === \"show\") ? (\n              <Text size=\"xs\" class=\"text-muted-foreground\">\n                {labels.note}\n              </Text>\n            ) : null}\n          </Stack>\n        </Box>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/order-summary.tsx",
      "target": "blocks/order-summary.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 SummaryRow = {\n  id: string;\n  label: string;\n  amount: number;\n  currency: string;\n  strong: boolean;\n};\n\nexport type SummaryLabels = {\n  checkout: string;\n  note: string;\n};\n",
      "path": "blocks/order-summary.types.ts",
      "target": "blocks/order-summary.types.ts"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "order-summary",
  "registryDependencies": [
    "compose",
    "empty-state",
    "section-frame",
    "utils"
  ],
  "runtime": "solid",
  "title": "Order Summary",
  "type": "registry:block"
}
