{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Book a table: name, phone, date, time, guests, optional notes and consent.",
  "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 ReservationLabels = {\n  name: string;\n  phone: string;\n  email: string;\n  date: string;\n  time: string;\n  guests: string;\n  notes: string;\n  consent: string;\n  submit: string;\n  decrease: string;\n  increase: string;\n};\n",
      "path": "blocks/reservation-form.types.ts",
      "target": "blocks/reservation-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 table reservation: name, phone and/or email, date, time, guests, optional notes and consent; in the split\n  layout, the ways to reach the house sit beside the form. Axes: layout (single, split), density, fields (full,\n  compact).\n-->\n<script lang=\"ts\">\nimport type { ReservationLabels } from \"./reservation-form.types\";\nimport type { Feature } from \"./feature-grid.types\";\n\nexport type ReservationFormProps = {\n  id: string;\n  title: string;\n  text: string;\n  labels: ReservationLabels;\n  details: Feature[];\n  layout?: \"single\" | \"split\";\n  fields?: \"full\" | \"compact\";\n  terms?: \"show\" | \"hide\";\n  density?: \"default\" | \"compact\";\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 Checkbox from \"../compose/Checkbox.vue\";\nimport Form from \"../compose/Form.vue\";\nimport Grid from \"../compose/Grid.vue\";\nimport Group from \"../compose/Group.vue\";\nimport Input from \"../compose/Input.vue\";\nimport Label from \"../compose/Label.vue\";\nimport LucideIcon from \"../icons/LucideIcon.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Text from \"../compose/Text.vue\";\nimport Textarea from \"../compose/Textarea.vue\";\nimport Field from \"../components/field.vue\";\nimport NumberField from \"../components/number-field.vue\";\nimport SectionFrame from \"../components/section-frame.vue\";\nimport { cn, tpl } from \"../utils\";\n\nconst {\n  id,\n  title,\n  text,\n  labels,\n  details,\n  layout = \"single\",\n  fields = \"full\",\n  terms = \"hide\",\n  density = \"default\",\n  landmarkLabel,\n} = defineProps<ReservationFormProps>();\n</script>\n\n<template>\n  <SectionFrame\n    :id=\"id\"\n    :title=\"title\"\n    :lead=\"text\"\n    :density=\"density\"\n    :measure=\"(((layout as string) === 'single') ? 'xl' : 'default')\"\n    :landmarkLabel=\"landmarkLabel\"\n  >\n    <Grid :cols=\"(((layout as string) === 'split') ? '1-2' : '1')\" class=\"items-start gap-8\">\n      <Form method=\"dialog\" class=\"flex w-full flex-col gap-4\" data-slot=\"reservation-form\">\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 v-if=\"((fields as string) === 'full')\" :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        <Group gap=\"4\" class=\"flex-wrap\">\n          <Box class=\"min-w-0 flex-1\">\n            <Field :label=\"labels.date\" :htmlFor=\"tpl('{0}-date', id)\">\n              <Input type=\"date\" name=\"date\" :id=\"tpl('{0}-date', id)\" data-slot=\"field\" />\n            </Field>\n          </Box>\n          <Box class=\"min-w-0 flex-1\">\n            <Field :label=\"labels.time\" :htmlFor=\"tpl('{0}-time', id)\">\n              <Input type=\"time\" name=\"time\" :id=\"tpl('{0}-time', id)\" data-slot=\"field\" />\n            </Field>\n          </Box>\n        </Group>\n        <Stack gap=\"2\">\n          <Label class=\"text-xs font-bold text-foreground\">\n            {{ labels.guests }}\n          </Label>\n          <NumberField\n            value=\"2\"\n            :name=\"tpl('{0}-guests', id)\"\n            min=\"1\"\n            :label=\"labels.guests\"\n            :decrease=\"labels.decrease\"\n            :increase=\"labels.increase\"\n          />\n        </Stack>\n        <Field v-if=\"((fields as string) === 'full')\" :label=\"labels.notes\" :htmlFor=\"tpl('{0}-notes', id)\">\n          <Textarea :rows=\"4\" name=\"notes\" :id=\"tpl('{0}-notes', id)\" data-slot=\"field\" />\n        </Field>\n        <Group v-if=\"((terms as string) === 'show')\" gap=\"2\" align=\"center\" :class=\"cn('w-fit', '')\">\n          <Checkbox name=\"consent\" :id=\"tpl('{0}-consent', id)\" />\n          <Label :for=\"tpl('{0}-consent', id)\" class=\"text-sm\">\n            {{ labels.consent }}\n          </Label>\n        </Group>\n        <Button variant=\"default\" size=\"default\" type=\"submit\" class=\"w-fit\">\n          {{ labels.submit }}\n        </Button>\n      </Form>\n      <Stack v-if=\"(((layout as string) === 'split') && ((details?.length ?? 0) > 0))\" gap=\"4\" data-slot=\"details\">\n        <Group v-for=\"d in details\" :key=\"d.id\" gap=\"4\" align=\"start\" data-slot=\"detail\">\n          <LucideIcon :name=\"d.icon\" :size=\"20\" />\n          <Stack gap=\"0\">\n            <Text size=\"base\" weight=\"semibold\">\n              {{ d.title }}\n            </Text>\n            <Text size=\"sm\" class=\"text-muted-foreground\">\n              {{ d.text }}\n            </Text>\n          </Stack>\n        </Group>\n      </Stack>\n    </Grid>\n  </SectionFrame>\n</template>\n",
      "path": "blocks/reservation-form.vue",
      "target": "blocks/reservation-form.vue"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "restaurant",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "reservation-form",
  "registryDependencies": [
    "box",
    "button",
    "checkbox",
    "feature-grid",
    "field",
    "form",
    "grid",
    "group",
    "input",
    "label",
    "lucide-icon",
    "number-field",
    "section-frame",
    "stack",
    "text",
    "textarea",
    "utils"
  ],
  "runtime": "vue",
  "title": "Reservation Form",
  "type": "registry:block"
}
