{
  "$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/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n\nexport type CheckoutLabels = {\n  contacts: string;\n  contactsText: string;\n  name: string;\n  phone: string;\n  email: string;\n  address: string;\n  addressText: string;\n  street: string;\n  house: string;\n  flat: string;\n  entrance: string;\n  floor: string;\n  comment: string;\n  slot: string;\n  slotText: string;\n  payment: string;\n  paymentText: string;\n  consent: string;\n  submit: string;\n  legal: string;\n};\n",
      "path": "blocks/checkout-form.types.ts",
      "target": "blocks/checkout-form.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  A checkout on one page: contacts, address, a delivery window, the payment and the consent as stacked steps,\n  beside a sticky order summary with the lines, a promo code and the totals. Static markup. Axes: layout (cards:\n  each step in a card, numbered: numbered steps divided by a line), summary (aside, none), tone.\n-->\n<script lang=\"ts\">\nimport type { CheckoutLabels } from \"./checkout-form.types\";\nimport type { Day } from \"../components/slot-grid.types\";\nimport type { Payment } from \"../components/payment-options.types\";\nimport type { CartLine } from \"./cart-list.types\";\nimport type { SummaryRow } from \"./order-summary.types\";\nimport type { Promo, CartSummaryLabels } from \"../components/cart-summary-card.types\";\n\nexport type CheckoutFormProps = {\n  id: string;\n  title?: string;\n  days: Day[];\n  payments: Payment[];\n  lines: CartLine[];\n  rows: SummaryRow[];\n  promos: Promo[];\n  labels: CheckoutLabels;\n  totals: CartSummaryLabels;\n  layout?: \"cards\" | \"numbered\";\n  summary?: \"aside\" | \"none\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Form from \"../compose/Form.vue\";\nimport Grid from \"../compose/Grid.vue\";\nimport Input from \"../compose/Input.vue\";\nimport Textarea from \"../compose/Textarea.vue\";\nimport CartSummaryCard from \"../components/cart-summary-card.vue\";\nimport CheckoutStep from \"../components/checkout-step.vue\";\nimport CheckoutSubmit from \"../components/checkout-submit.vue\";\nimport Field from \"../components/field.vue\";\nimport PaymentOptions from \"../components/payment-options.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport SlotGrid from \"../components/slot-grid.vue\";\nimport { tpl } from \"../utils\";\n\nconst {\n  id,\n  title = \"\",\n  days,\n  payments,\n  lines,\n  rows,\n  promos,\n  labels,\n  totals,\n  layout = \"cards\",\n  summary = \"aside\",\n  tone = \"default\",\n  landmarkLabel,\n} = defineProps<CheckoutFormProps>();\n</script>\n\n<template>\n  <SectionFrame :id=\"id\" :title=\"title\" :tone=\"tone\" :landmarkLabel=\"landmarkLabel\">\n    <Box class=\"grid grid-cols-1 items-start gap-8 lg:grid-cols-3\">\n      <Form\n        method=\"dialog\"\n        :class=\"\n          (summary as string) === 'aside' ? 'flex flex-col gap-6 lg:col-span-2'\n          : 'flex flex-col gap-6 lg:col-span-3'\n        \"\n        data-slot=\"checkout-form\"\n      >\n        <CheckoutStep number=\"1\" :title=\"labels.contacts\" :text=\"labels.contactsText\" :layout=\"layout\">\n          <Grid cols=\"1-2\" class=\"gap-4\">\n            <Field :label=\"labels.name\" :htmlFor=\"tpl('{0}-name', id)\">\n              <Input type=\"text\" name=\"name\" autocomplete=\"name\" :id=\"tpl('{0}-name', id)\" data-slot=\"field\" />\n            </Field>\n            <Field :label=\"labels.phone\" :htmlFor=\"tpl('{0}-phone', id)\">\n              <Input type=\"tel\" name=\"phone\" autocomplete=\"tel\" :id=\"tpl('{0}-phone', id)\" data-slot=\"field\" />\n            </Field>\n            <Field :label=\"labels.email\" :htmlFor=\"tpl('{0}-email', id)\">\n              <Input type=\"email\" name=\"email\" autocomplete=\"email\" :id=\"tpl('{0}-email', id)\" data-slot=\"field\" />\n            </Field>\n          </Grid>\n        </CheckoutStep>\n        <CheckoutStep number=\"2\" :title=\"labels.address\" :text=\"labels.addressText\" :layout=\"layout\">\n          <Field :label=\"labels.street\" :htmlFor=\"tpl('{0}-street', id)\">\n            <Input type=\"text\" name=\"street\" autocomplete=\"address-line1\" :id=\"tpl('{0}-street', id)\" data-slot=\"field\" />\n          </Field>\n          <Grid cols=\"2-4\" class=\"gap-4\">\n            <Field :label=\"labels.house\" :htmlFor=\"tpl('{0}-house', id)\">\n              <Input type=\"text\" name=\"house\" :id=\"tpl('{0}-house', id)\" data-slot=\"field\" />\n            </Field>\n            <Field :label=\"labels.flat\" :htmlFor=\"tpl('{0}-flat', id)\">\n              <Input type=\"text\" name=\"flat\" :id=\"tpl('{0}-flat', id)\" data-slot=\"field\" />\n            </Field>\n            <Field :label=\"labels.entrance\" :htmlFor=\"tpl('{0}-entrance', id)\">\n              <Input type=\"text\" name=\"entrance\" :id=\"tpl('{0}-entrance', id)\" data-slot=\"field\" />\n            </Field>\n            <Field :label=\"labels.floor\" :htmlFor=\"tpl('{0}-floor', id)\">\n              <Input type=\"text\" name=\"floor\" :id=\"tpl('{0}-floor', id)\" data-slot=\"field\" />\n            </Field>\n          </Grid>\n          <Field :label=\"labels.comment\" :htmlFor=\"tpl('{0}-comment', id)\">\n            <Textarea :rows=\"4\" name=\"comment\" :id=\"tpl('{0}-comment', id)\" data-slot=\"field\" />\n          </Field>\n        </CheckoutStep>\n        <CheckoutStep number=\"3\" :title=\"labels.slot\" :text=\"labels.slotText\" :layout=\"layout\">\n          <SlotGrid v-if=\"((days?.length ?? 0) > 0)\" :days=\"days\" :name=\"tpl('{0}-slot', id)\" item=\"plain\" />\n        </CheckoutStep>\n        <CheckoutStep number=\"4\" :title=\"labels.payment\" :text=\"labels.paymentText\" :layout=\"layout\">\n          <PaymentOptions\n            v-if=\"((payments?.length ?? 0) > 0)\"\n            :payments=\"payments\"\n            :name=\"tpl('{0}-payment', id)\"\n            checked=\"payment-card\"\n          />\n        </CheckoutStep>\n        <CheckoutSubmit :id=\"id\" :consent=\"labels.consent\" :submit=\"labels.submit\" :legal=\"labels.legal\" />\n      </Form>\n      <Box v-if=\"((summary as string) === 'aside')\" class=\"lg:sticky lg:top-8\" data-slot=\"aside\">\n        <CartSummaryCard\n          :field=\"tpl('{0}-promo', id)\"\n          :lines=\"lines\"\n          :rows=\"rows\"\n          :promos=\"promos\"\n          :labels=\"totals\"\n          items=\"show\"\n        />\n      </Box>\n    </Box>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/checkout-form.vue",
      "target": "blocks/checkout-form.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "checkout-form",
  "registryDependencies": [
    "box",
    "cart-list",
    "cart-summary-card",
    "checkout-step",
    "checkout-submit",
    "field",
    "form",
    "grid",
    "input",
    "order-summary",
    "payment-options",
    "section-frame",
    "slot-grid",
    "textarea",
    "utils"
  ],
  "runtime": "vue",
  "title": "Checkout Form",
  "type": "registry:block"
}
