{
  "$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/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/slot-board.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/button\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\tselectfield \"github.com/ui8kit/codegen/generated/templ/ui/select\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// SlotBoardProps are the props of SlotBoard; the values are the JSON shapes of the TypeScript props.\ntype SlotBoardProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tDays any `json:\"days\"`\n\tEmpty any `json:\"empty\"`\n\tZone any `json:\"zone\"`\n\tLabels any `json:\"labels\"`\n\tLayout any `json:\"layout\"`\n\tItem any `json:\"item\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Pick a delivery window: the days with their windows as radio chips, beside a card with the zone, its price and the buttons. Static markup. Axes: layout (split: the card beside the days, stacked: the days only), item (card, plain), tone.\ntempl SlotBoard(p SlotBoardProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLead := uiutils.Def(p.Lead, \"\") }}\n\t{{ vDays := p.Days }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vZone := p.Zone }}\n\t{{ vLabels := p.Labels }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"split\") }}\n\t{{ vItem := uiutils.Def(p.Item, \"card\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, LandmarkLabel: vLandmarkLabel}) {\n\t\tif uiutils.Eq(uiutils.Len(vDays), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"calendar\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"grid grid-cols-1 items-start gap-8 lg:grid-cols-3\"}}) {\n\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"lg:col-span-2\", \"lg:col-span-3\"))}}) {\n\t\t\t\t\t@SlotGrid(SlotGridProps{Days: vDays, Name: uiutils.Tpl(\"{0}-slot\", vId), Item: vItem})\n\t\t\t\t}\n\t\t\t\tif uiutils.Eq(vLayout, \"split\") {\n\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{Class: \"rounded bg-card inset-ring inset-ring-border p-6\", Attrs: uiutils.Attrs(\"data-slot\", \"aside\")}}) {\n\t\t\t\t\t\t@Field(FieldProps{Label: uiutils.Get(vLabels, \"zone\"), HtmlFor: uiutils.Tpl(\"{0}-zone\", vId)}) {\n\t\t\t\t\t\t\t@compose.Select(compose.SelectProps{SelectProps: selectfield.SelectProps{Name: uiutils.S(uiutils.Tpl(\"{0}-zone\", vId)), Attrs: uiutils.Attrs(\"id\", uiutils.Tpl(\"{0}-zone\", vId))}}) {\n\t\t\t\t\t\t\t\t@selectfield.SelectOption(selectfield.SelectOptionProps{Value: uiutils.SP(uiutils.Get(vZone, \"id\")), Selected: true, Attrs: uiutils.Attrs(\"label\", uiutils.Get(vZone, \"name\"))})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: \"ul\", Class: \"flex flex-col gap-2\"}}) {\n\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex items-center justify-between gap-4 text-sm\"}}) {\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"price\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"font-medium\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Money(uiutils.Get(vZone, \"price\"), uiutils.Get(vZone, \"currency\"))) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex items-center justify-between gap-4 text-sm\"}}) {\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"freeFrom\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"font-medium\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Money(uiutils.Get(vZone, \"freeFrom\"), uiutils.Get(vZone, \"currency\"))) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex items-center justify-between gap-4 text-sm\"}}) {\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"time\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"font-medium\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vZone, \"time\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"default\", Size: \"default\", ButtonProps: button.ButtonProps{Class: \"w-full\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"primary\")) }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"outline\", Size: \"default\", ButtonProps: button.ButtonProps{Class: \"w-full\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"secondary\")) }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"xs\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"note\")) }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/slot-board.templ",
      "target": "blocks/slot-board.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "delivery",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "slot-board",
  "registryDependencies": [
    "box",
    "button",
    "empty-state",
    "field",
    "inline",
    "kit-box",
    "kit-button",
    "kit-select",
    "kit-text",
    "list",
    "list-item",
    "section-frame",
    "select",
    "slot-grid",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Slot Board",
  "type": "registry:block"
}
