{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Delivery zones and their prices as a table or as cards.",
  "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 Zone = {\n  id: string;\n  name: string;\n  area: string;\n  price: number;\n  freeFrom: number;\n  minOrder: number;\n  time: string;\n  express: string;\n  currency: string;\n};\n\nexport type ZoneLabels = {\n  caption: string;\n  zone: string;\n  price: string;\n  freeFrom: string;\n  minOrder: string;\n  time: string;\n  express: string;\n};\n",
      "path": "blocks/zone-table.types.ts",
      "target": "blocks/zone-table.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  Delivery zones and their prices as a table or as cards: the zone and its areas, the price, the order that\n  ships free, the minimum order, the time and an express badge. Axes: layout (table, cards), tone, density.\n-->\n<script lang=\"ts\">\nimport type { Zone, ZoneLabels } from \"./zone-table.types\";\n\nexport type ZoneTableProps = {\n  id: string;\n  title: string;\n  lead?: string;\n  zones: Zone[];\n  empty?: string;\n  labels: ZoneLabels;\n  layout?: \"table\" | \"cards\";\n  tone?: \"default\" | \"muted\";\n  density?: \"default\" | \"compact\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Badge from \"../compose/Badge.vue\";\nimport Grid from \"../compose/Grid.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 Title from \"../compose/Title.vue\";\nimport EmptyState from \"../components/empty-state.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport ZoneRows from \"../components/zone-rows.vue\";\nimport { fmtMoney } from \"../utils\";\n\nconst {\n  id,\n  title,\n  lead = \"\",\n  zones,\n  empty = \"\",\n  labels,\n  layout = \"table\",\n  tone = \"default\",\n  density = \"default\",\n  landmarkLabel,\n} = defineProps<ZoneTableProps>();\n</script>\n\n<template>\n  <SectionFrame\n    :id=\"id\"\n    :title=\"title\"\n    :lead=\"lead\"\n    :tone=\"tone\"\n    :density=\"density\"\n    :landmarkLabel=\"landmarkLabel\"\n  >\n    <EmptyState v-if=\"((zones?.length ?? 0) === 0)\" icon=\"map\" :title=\"empty\" />\n    <ZoneRows v-else-if=\"((layout as string) === 'table')\" :zones=\"zones\" :labels=\"labels\" />\n    <Grid v-else cols=\"1-3\" class=\"gap-4\" data-slot=\"items\">\n      <Stack\n        v-for=\"z in zones\"\n        :key=\"z.id\"\n        gap=\"4\"\n        class=\"rounded bg-card inset-ring inset-ring-border p-6\"\n        data-slot=\"item\"\n      >\n        <Stack gap=\"2\">\n          <Title :as=\"3\" size=\"lg\" weight=\"bold\">\n            {{ z.name }}\n          </Title>\n          <Text size=\"sm\" class=\"text-muted-foreground\">\n            {{ z.area }}\n          </Text>\n        </Stack>\n        <Text size=\"3xl\" weight=\"bold\">\n          {{ fmtMoney(z.price, z.currency) }}\n        </Text>\n        <List tag=\"ul\" class=\"flex flex-col gap-2 border-t border-border pt-4\">\n          <ListItem class=\"flex items-center justify-between gap-4 text-sm\">\n            <Inline class=\"text-muted-foreground\">\n              {{ labels.freeFrom }}\n            </Inline>\n            <Inline class=\"font-medium\">\n              {{ fmtMoney(z.freeFrom, z.currency) }}\n            </Inline>\n          </ListItem>\n          <ListItem class=\"flex items-center justify-between gap-4 text-sm\">\n            <Inline class=\"text-muted-foreground\">\n              {{ labels.minOrder }}\n            </Inline>\n            <Inline class=\"font-medium\">\n              {{ fmtMoney(z.minOrder, z.currency) }}\n            </Inline>\n          </ListItem>\n          <ListItem class=\"flex items-center justify-between gap-4 text-sm\">\n            <Inline class=\"text-muted-foreground\">\n              {{ labels.time }}\n            </Inline>\n            <Inline class=\"font-medium\">\n              {{ z.time }}\n            </Inline>\n          </ListItem>\n        </List>\n        <Badge v-if=\"z.express\" variant=\"secondary\" size=\"default\" class=\"w-fit\">\n          {{ z.express }}\n        </Badge>\n      </Stack>\n    </Grid>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/zone-table.vue",
      "target": "blocks/zone-table.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "delivery",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "zone-table",
  "registryDependencies": [
    "badge",
    "empty-state",
    "grid",
    "inline",
    "list",
    "list-item",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils",
    "zone-rows"
  ],
  "runtime": "vue",
  "title": "Zone Table",
  "type": "registry:block"
}
