{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Contacts, address, a window and the payment beside a sticky order summary.",
  "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/checkout-form.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/form\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/input\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/textarea\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// CheckoutFormProps are the props of CheckoutForm; the values are the JSON shapes of the TypeScript props.\ntype CheckoutFormProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tDays any `json:\"days\"`\n\tPayments any `json:\"payments\"`\n\tLines any `json:\"lines\"`\n\tRows any `json:\"rows\"`\n\tPromos any `json:\"promos\"`\n\tLabels any `json:\"labels\"`\n\tTotals any `json:\"totals\"`\n\tLayout any `json:\"layout\"`\n\tSummary any `json:\"summary\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A checkout on one page: contacts, address, a delivery window, the payment and the consent as stacked steps, beside a sticky order summary with the lines, a promo code and the totals. Static markup. Axes: layout (cards: each step in a card, numbered: numbered steps divided by a line), summary (aside, none), tone.\ntempl CheckoutForm(p CheckoutFormProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := uiutils.Def(p.Title, \"\") }}\n\t{{ vDays := p.Days }}\n\t{{ vPayments := p.Payments }}\n\t{{ vLines := p.Lines }}\n\t{{ vRows := p.Rows }}\n\t{{ vPromos := p.Promos }}\n\t{{ vLabels := p.Labels }}\n\t{{ vTotals := p.Totals }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"cards\") }}\n\t{{ vSummary := uiutils.Def(p.Summary, \"aside\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, LandmarkLabel: vLandmarkLabel}) {\n\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@compose.Form(compose.FormProps{FormProps: form.FormProps{Method: \"dialog\", Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vSummary, \"aside\")), \"flex flex-col gap-6 lg:col-span-2\", \"flex flex-col gap-6 lg:col-span-3\")), Attrs: uiutils.Attrs(\"data-slot\", \"checkout-form\")}}) {\n\t\t\t\t@CheckoutStep(CheckoutStepProps{Number: \"1\", Title: uiutils.Get(vLabels, \"contacts\"), Text: uiutils.Get(vLabels, \"contactsText\"), Layout: vLayout}) {\n\t\t\t\t\t@compose.Grid(compose.GridProps{Cols: \"1-2\", BoxProps: box.BoxProps{Class: \"gap-4\"}}) {\n\t\t\t\t\t\t@Field(FieldProps{Label: uiutils.Get(vLabels, \"name\"), HtmlFor: uiutils.Tpl(\"{0}-name\", vId)}) {\n\t\t\t\t\t\t\t@compose.Input(compose.InputProps{InputProps: input.InputProps{Type: \"text\", Name: \"name\", Attrs: uiutils.Attrs(\"autocomplete\", \"name\", \"id\", uiutils.Tpl(\"{0}-name\", vId), \"data-slot\", \"field\")}})\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@Field(FieldProps{Label: uiutils.Get(vLabels, \"phone\"), HtmlFor: uiutils.Tpl(\"{0}-phone\", vId)}) {\n\t\t\t\t\t\t\t@compose.Input(compose.InputProps{InputProps: input.InputProps{Type: \"tel\", Name: \"phone\", Attrs: uiutils.Attrs(\"autocomplete\", \"tel\", \"id\", uiutils.Tpl(\"{0}-phone\", vId), \"data-slot\", \"field\")}})\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@Field(FieldProps{Label: uiutils.Get(vLabels, \"email\"), HtmlFor: uiutils.Tpl(\"{0}-email\", vId)}) {\n\t\t\t\t\t\t\t@compose.Input(compose.InputProps{InputProps: input.InputProps{Type: \"email\", Name: \"email\", Attrs: uiutils.Attrs(\"autocomplete\", \"email\", \"id\", uiutils.Tpl(\"{0}-email\", vId), \"data-slot\", \"field\")}})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@CheckoutStep(CheckoutStepProps{Number: \"2\", Title: uiutils.Get(vLabels, \"address\"), Text: uiutils.Get(vLabels, \"addressText\"), Layout: vLayout}) {\n\t\t\t\t\t@Field(FieldProps{Label: uiutils.Get(vLabels, \"street\"), HtmlFor: uiutils.Tpl(\"{0}-street\", vId)}) {\n\t\t\t\t\t\t@compose.Input(compose.InputProps{InputProps: input.InputProps{Type: \"text\", Name: \"street\", Attrs: uiutils.Attrs(\"autocomplete\", \"address-line1\", \"id\", uiutils.Tpl(\"{0}-street\", vId), \"data-slot\", \"field\")}})\n\t\t\t\t\t}\n\t\t\t\t\t@compose.Grid(compose.GridProps{Cols: \"2-4\", BoxProps: box.BoxProps{Class: \"gap-4\"}}) {\n\t\t\t\t\t\t@Field(FieldProps{Label: uiutils.Get(vLabels, \"house\"), HtmlFor: uiutils.Tpl(\"{0}-house\", vId)}) {\n\t\t\t\t\t\t\t@compose.Input(compose.InputProps{InputProps: input.InputProps{Type: \"text\", Name: \"house\", Attrs: uiutils.Attrs(\"id\", uiutils.Tpl(\"{0}-house\", vId), \"data-slot\", \"field\")}})\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@Field(FieldProps{Label: uiutils.Get(vLabels, \"flat\"), HtmlFor: uiutils.Tpl(\"{0}-flat\", vId)}) {\n\t\t\t\t\t\t\t@compose.Input(compose.InputProps{InputProps: input.InputProps{Type: \"text\", Name: \"flat\", Attrs: uiutils.Attrs(\"id\", uiutils.Tpl(\"{0}-flat\", vId), \"data-slot\", \"field\")}})\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@Field(FieldProps{Label: uiutils.Get(vLabels, \"entrance\"), HtmlFor: uiutils.Tpl(\"{0}-entrance\", vId)}) {\n\t\t\t\t\t\t\t@compose.Input(compose.InputProps{InputProps: input.InputProps{Type: \"text\", Name: \"entrance\", Attrs: uiutils.Attrs(\"id\", uiutils.Tpl(\"{0}-entrance\", vId), \"data-slot\", \"field\")}})\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@Field(FieldProps{Label: uiutils.Get(vLabels, \"floor\"), HtmlFor: uiutils.Tpl(\"{0}-floor\", vId)}) {\n\t\t\t\t\t\t\t@compose.Input(compose.InputProps{InputProps: input.InputProps{Type: \"text\", Name: \"floor\", Attrs: uiutils.Attrs(\"id\", uiutils.Tpl(\"{0}-floor\", vId), \"data-slot\", \"field\")}})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@Field(FieldProps{Label: uiutils.Get(vLabels, \"comment\"), HtmlFor: uiutils.Tpl(\"{0}-comment\", vId)}) {\n\t\t\t\t\t\t@compose.Textarea(compose.TextareaProps{TextareaProps: textarea.TextareaProps{Rows: \"4\", Name: \"comment\", Attrs: uiutils.Attrs(\"id\", uiutils.Tpl(\"{0}-comment\", vId), \"data-slot\", \"field\")}})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@CheckoutStep(CheckoutStepProps{Number: \"3\", Title: uiutils.Get(vLabels, \"slot\"), Text: uiutils.Get(vLabels, \"slotText\"), Layout: vLayout}) {\n\t\t\t\t\tif uiutils.Gt(uiutils.Len(vDays), float64(0)) {\n\t\t\t\t\t\t@SlotGrid(SlotGridProps{Days: vDays, Name: uiutils.Tpl(\"{0}-slot\", vId), Item: \"plain\"})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@CheckoutStep(CheckoutStepProps{Number: \"4\", Title: uiutils.Get(vLabels, \"payment\"), Text: uiutils.Get(vLabels, \"paymentText\"), Layout: vLayout}) {\n\t\t\t\t\tif uiutils.Gt(uiutils.Len(vPayments), float64(0)) {\n\t\t\t\t\t\t@PaymentOptions(PaymentOptionsProps{Payments: vPayments, Name: uiutils.Tpl(\"{0}-payment\", vId), Checked: \"payment-card\"})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@CheckoutSubmit(CheckoutSubmitProps{Id: vId, Consent: uiutils.Get(vLabels, \"consent\"), Submit: uiutils.Get(vLabels, \"submit\"), Legal: uiutils.Get(vLabels, \"legal\")})\n\t\t\t}\n\t\t\tif uiutils.Eq(vSummary, \"aside\") {\n\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"lg:sticky lg:top-8\", Attrs: uiutils.Attrs(\"data-slot\", \"aside\")}}) {\n\t\t\t\t\t@CartSummaryCard(CartSummaryCardProps{Field: uiutils.Tpl(\"{0}-promo\", vId), Lines: vLines, Rows: vRows, Promos: vPromos, Labels: vTotals, Items: \"show\"})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/checkout-form.templ",
      "target": "blocks/checkout-form.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "checkout-form",
  "registryDependencies": [
    "box",
    "cart-summary-card",
    "checkout-step",
    "checkout-submit",
    "field",
    "form",
    "grid",
    "input",
    "kit-box",
    "kit-form",
    "kit-input",
    "kit-textarea",
    "payment-options",
    "section-frame",
    "slot-grid",
    "textarea",
    "utils"
  ],
  "runtime": "templ",
  "title": "Checkout Form",
  "type": "registry:block"
}
