{
  "$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\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"
    },
    {
      "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-->\n<script lang=\"ts\">\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</script>\n\n<script setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Button from \"../compose/Button.vue\";\nimport Inline from \"../compose/Inline.vue\";\nimport List from \"../compose/List.vue\";\nimport ListItem from \"../compose/ListItem.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Text from \"../compose/Text.vue\";\nimport EmptyState from \"../components/empty-state.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport { cn, fmtMoney } from \"../utils\";\n\nconst {\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} = defineProps<OrderSummaryProps>();\n</script>\n\n<template>\n  <SectionFrame\n    :id=\"id\"\n    :title=\"title\"\n    :tone=\"tone\"\n    :density=\"density\"\n    measure=\"md\"\n    :landmarkLabel=\"landmarkLabel\"\n  >\n    <EmptyState v-if=\"((rows?.length ?? 0) === 0)\" icon=\"receipt\" :title=\"empty\" />\n    <Box v-else\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          <ListItem v-for=\"row in rows\" :key=\"row.id\"\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        </List>\n        <Button v-if=\"((cta as string) === 'show')\" variant=\"default\" size=\"default\" class=\"w-full\">\n          {{ labels.checkout }}\n        </Button>\n        <Text v-if=\"((note as string) === 'show')\" size=\"xs\" class=\"text-muted-foreground\">\n          {{ labels.note }}\n        </Text>\n      </Stack>\n    </Box>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/order-summary.vue",
      "target": "blocks/order-summary.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "order-summary",
  "registryDependencies": [
    "box",
    "button",
    "empty-state",
    "inline",
    "list",
    "list-item",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "vue",
  "title": "Order Summary",
  "type": "registry:block"
}
