{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Days with their delivery windows as radio chips, beside the zone card.",
  "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 SlotLabels = {\n  zone: string;\n  price: string;\n  freeFrom: string;\n  time: string;\n  primary: string;\n  secondary: string;\n  note: string;\n};\n",
      "path": "blocks/slot-board.types.ts",
      "target": "blocks/slot-board.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  Pick a delivery window: the days with their windows as radio chips, beside a card with the zone, its price and\n  the buttons. Static markup. Axes: layout (split: the card beside the days, stacked: the days only), item\n  (card, plain), tone.\n-->\n<script lang=\"ts\">\nimport type { SlotLabels } from \"./slot-board.types\";\nimport type { Day } from \"../components/slot-grid.types\";\nimport type { Zone } from \"./zone-table.types\";\n\nexport type SlotBoardProps = {\n  id: string;\n  title: string;\n  lead?: string;\n  days: Day[];\n  empty?: string;\n  zone: Zone;\n  labels: SlotLabels;\n  layout?: \"split\" | \"stacked\";\n  item?: \"card\" | \"plain\";\n  tone?: \"default\" | \"muted\";\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 Select from \"../compose/Select.vue\";\nimport SelectOption from \"../compose/SelectOption.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Text from \"../compose/Text.vue\";\nimport EmptyState from \"../components/empty-state.vue\";\nimport Field from \"../components/field.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport SlotGrid from \"../components/slot-grid.vue\";\nimport { fmtMoney, tpl } from \"../utils\";\n\nconst {\n  id,\n  title,\n  lead = \"\",\n  days,\n  empty = \"\",\n  zone,\n  labels,\n  layout = \"split\",\n  item = \"card\",\n  tone = \"default\",\n  landmarkLabel,\n} = defineProps<SlotBoardProps>();\n</script>\n\n<template>\n  <SectionFrame :id=\"id\" :title=\"title\" :lead=\"lead\" :tone=\"tone\" :landmarkLabel=\"landmarkLabel\">\n    <EmptyState v-if=\"((days?.length ?? 0) === 0)\" icon=\"calendar\" :title=\"empty\" />\n    <Box v-else class=\"grid grid-cols-1 items-start gap-8 lg:grid-cols-3\">\n      <Box :class=\"(((layout as string) === 'split') ? 'lg:col-span-2' : 'lg:col-span-3')\">\n        <SlotGrid :days=\"days\" :name=\"tpl('{0}-slot', id)\" :item=\"item\" />\n      </Box>\n      <Stack\n        v-if=\"((layout as string) === 'split')\"\n        gap=\"4\"\n        align=\"stretch\"\n        class=\"rounded bg-card inset-ring inset-ring-border p-6\"\n        data-slot=\"aside\"\n      >\n        <Field :label=\"labels.zone\" :htmlFor=\"tpl('{0}-zone', id)\">\n          <Select :name=\"tpl('{0}-zone', id)\" :id=\"tpl('{0}-zone', id)\">\n            <SelectOption :value=\"zone.id\" :label=\"zone.name\" :selected=\"true\" />\n          </Select>\n        </Field>\n        <List tag=\"ul\" class=\"flex flex-col gap-2\">\n          <ListItem class=\"flex items-center justify-between gap-4 text-sm\">\n            <Inline class=\"text-muted-foreground\">\n              {{ labels.price }}\n            </Inline>\n            <Inline class=\"font-medium\">\n              {{ fmtMoney(zone.price, zone.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.freeFrom }}\n            </Inline>\n            <Inline class=\"font-medium\">\n              {{ fmtMoney(zone.freeFrom, zone.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              {{ zone.time }}\n            </Inline>\n          </ListItem>\n        </List>\n        <Button variant=\"default\" size=\"default\" class=\"w-full\">\n          {{ labels.primary }}\n        </Button>\n        <Button variant=\"outline\" size=\"default\" class=\"w-full\">\n          {{ labels.secondary }}\n        </Button>\n        <Text size=\"xs\" class=\"text-muted-foreground\">\n          {{ labels.note }}\n        </Text>\n      </Stack>\n    </Box>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/slot-board.vue",
      "target": "blocks/slot-board.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "delivery",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "slot-board",
  "registryDependencies": [
    "box",
    "button",
    "empty-state",
    "field",
    "inline",
    "list",
    "list-item",
    "section-frame",
    "select",
    "select-option",
    "slot-grid",
    "stack",
    "text",
    "utils",
    "zone-table"
  ],
  "runtime": "vue",
  "title": "Slot Board",
  "type": "registry:block"
}
