{
  "$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/**\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 */\nimport { type ReactNode } from \"react\";\nimport { Box, Button, Inline, List, ListItem, Select, SelectOption, Stack, Text } from \"../compose\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { Field } from \"../components/field\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { SlotGrid } from \"../components/slot-grid\";\nimport { fmtMoney, tpl } from \"../utils\";\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\nexport function SlotBoard({\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}: SlotBoardProps) {\n  return (\n    <SectionFrame id={id} title={title} lead={lead} tone={tone} landmarkLabel={landmarkLabel}>\n      {((days?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"calendar\" title={empty} />\n      ) : (\n        <Box className=\"grid grid-cols-1 items-start gap-8 lg:grid-cols-3\">\n          <Box className={(((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          {((layout as string) === \"split\") ? (\n            <Stack gap=\"4\" align=\"stretch\" className=\"rounded bg-card inset-ring inset-ring-border p-6\" data-slot=\"aside\">\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\" className=\"flex flex-col gap-2\">\n                <ListItem className=\"flex items-center justify-between gap-4 text-sm\">\n                  <Inline className=\"text-muted-foreground\">\n                    {labels.price}\n                  </Inline>\n                  <Inline className=\"font-medium\">\n                    {fmtMoney(zone.price, zone.currency)}\n                  </Inline>\n                </ListItem>\n                <ListItem className=\"flex items-center justify-between gap-4 text-sm\">\n                  <Inline className=\"text-muted-foreground\">\n                    {labels.freeFrom}\n                  </Inline>\n                  <Inline className=\"font-medium\">\n                    {fmtMoney(zone.freeFrom, zone.currency)}\n                  </Inline>\n                </ListItem>\n                <ListItem className=\"flex items-center justify-between gap-4 text-sm\">\n                  <Inline className=\"text-muted-foreground\">\n                    {labels.time}\n                  </Inline>\n                  <Inline className=\"font-medium\">\n                    {zone.time}\n                  </Inline>\n                </ListItem>\n              </List>\n              <Button variant=\"default\" size=\"default\" className=\"w-full\">\n                {labels.primary}\n              </Button>\n              <Button variant=\"outline\" size=\"default\" className=\"w-full\">\n                {labels.secondary}\n              </Button>\n              <Text size=\"xs\" className=\"text-muted-foreground\">\n                {labels.note}\n              </Text>\n            </Stack>\n          ) : null}\n        </Box>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/slot-board.tsx",
      "target": "blocks/slot-board.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 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"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "delivery",
    "kind": "block",
    "tags": [
      "react",
      "block"
    ]
  },
  "name": "slot-board",
  "registryDependencies": [
    "compose",
    "empty-state",
    "field",
    "section-frame",
    "slot-grid",
    "utils",
    "zone-table"
  ],
  "runtime": "react",
  "title": "Slot Board",
  "type": "registry:block"
}
