@vergelijkdirect/comparison-forms 2.0.2 → 2.1.0-ver-9053.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +5 -5
  2. package/dist/vue/VdInput-CRb-iTiH.js +145 -0
  3. package/dist/vue/VdPopover-B78nVpNU.js +200 -0
  4. package/dist/vue/VdRadioGroup-D5kHcpsY.js +166 -0
  5. package/dist/vue/VdSearchableSelect-THqVGo_Q.js +209 -0
  6. package/dist/vue/VdSelect-Dv35x4sz.js +112 -0
  7. package/dist/vue/bike-Ch7ZcSpI.js +2 -0
  8. package/dist/vue/bike.presenter-CdCny1-M.js +1673 -0
  9. package/dist/vue/birthdate.schema-B9q6IeIR.js +91 -0
  10. package/dist/vue/businessCar.presenter-DR-Ozf6B.js +121 -0
  11. package/dist/vue/businessLiability-w4xhGnik.js +2 -0
  12. package/dist/vue/businessLiability.presenter-8iyRbLgw.js +80 -0
  13. package/dist/vue/car-business-DMYPV4UK.js +2 -0
  14. package/dist/vue/car-jPvIXEVK.js +2 -0
  15. package/dist/vue/car.presenter-gd62kiqS.js +130 -0
  16. package/dist/vue/caravan-B8l6zEkk.js +2 -0
  17. package/dist/vue/caravan.presenter-Cr5vuB_r.js +157 -0
  18. package/dist/vue/company.schema-DStHJpGH.js +241 -0
  19. package/dist/vue/comparison-forms.d.ts +34 -34
  20. package/dist/vue/comparison-forms.js +119 -5590
  21. package/dist/vue/date.util-DjJZwKvn.js +24 -0
  22. package/dist/vue/familyComposition.enum-D26VYo_a.js +6 -0
  23. package/dist/vue/familyComposition.schema-CNMH-wP0.js +75 -0
  24. package/dist/vue/house-BtQscoRa.js +2 -0
  25. package/dist/vue/house.presenter-DLeGfJAY.js +118 -0
  26. package/dist/vue/houseOwnedBuilding.model-BLLI1Vm0.js +14 -0
  27. package/dist/vue/itc-KSDsJZsI.js +10 -0
  28. package/dist/vue/legal-BjG3LO5G.js +2 -0
  29. package/dist/vue/legal.presenter-CwEVdXZJ.js +100 -0
  30. package/dist/vue/liability-_Sp33TSY.js +2 -0
  31. package/dist/vue/liability.presenter-C_5O-OQm.js +110 -0
  32. package/dist/vue/loan-T0OYMmxG.js +2 -0
  33. package/dist/vue/loan.presenter-CEZ3PcSo.js +198 -0
  34. package/dist/vue/messages-DRFu-PCu.js +40 -0
  35. package/dist/vue/moped-D9KUmwn6.js +2 -0
  36. package/dist/vue/moped.presenter-DazWxVEM.js +133 -0
  37. package/dist/vue/motor-BEAQ5N4w.js +2 -0
  38. package/dist/vue/motor.presenter-e_ESWwhI.js +130 -0
  39. package/dist/vue/package-DjsxU0ny.js +2 -0
  40. package/dist/vue/package.presenter-BA6S0X_L.js +137 -0
  41. package/dist/vue/pet-Bguvk2H4.js +2 -0
  42. package/dist/vue/pet.presenter-BpDDlFSQ.js +170 -0
  43. package/dist/vue/rules-3BZkSj_K.js +13 -0
  44. package/dist/vue/travel-C_cvpQNA.js +2 -0
  45. package/dist/vue/travel.presenter-DeoXBmrT.js +108 -0
  46. package/dist/vue/useAddress-C-h1pGI5.js +245 -0
  47. package/dist/vue/useLicensePlate-wAVrX9tr.js +187 -0
  48. package/dist/vue/useValidator-B8ZuqyvJ.js +535 -0
  49. package/dist/vue/yesNo-BvJlCm7Y.js +6 -0
  50. package/dist/wc/comparison-forms.js +14836 -14413
  51. package/dist/wc-noitc/comparison-forms.umd.cjs +3 -3
  52. package/package.json +1 -1
  53. package/dist/client/.vite/ssr-manifest.json +0 -600
  54. package/dist/client/assets/index-6Enzr9rU.css +0 -4
  55. package/dist/client/assets/index-6Enzr9rU.css.br +0 -0
  56. package/dist/client/assets/index-DUchBxEo.js +0 -57
  57. package/dist/client/assets/index-DUchBxEo.js.br +0 -0
  58. package/dist/client/index.html +0 -15
  59. package/dist/server/entry-server.js +0 -9981
  60. package/dist/server/entry-server.js.br +0 -0
@@ -0,0 +1,91 @@
1
+ import { t as e } from "./VdInput-CRb-iTiH.js";
2
+ import { r as t, t as n } from "./date.util-DjJZwKvn.js";
3
+ import { t as r } from "./messages-DRFu-PCu.js";
4
+ import { createBlock as i, createSlots as a, defineComponent as o, mergeModels as s, mergeProps as c, openBlock as l, renderSlot as u, unref as d, useModel as f, useSlots as p, withCtx as m } from "vue";
5
+ import { string as h } from "yup";
6
+ import "dayjs";
7
+ //#endregion
8
+ //#region src/components/fields/VdBirthdateInput.vue
9
+ var g = /* @__PURE__ */ o({
10
+ inheritAttrs: !1,
11
+ __name: "VdBirthdateInput",
12
+ props: /*@__PURE__*/ s({
13
+ label: { default: "Geboortedatum" },
14
+ placeholder: { default: "DD-MM-JJJJ" },
15
+ name: { default: "birthdate" },
16
+ mask: { default: "##-##-####" },
17
+ required: {
18
+ type: Boolean,
19
+ default: !1
20
+ }
21
+ }, {
22
+ modelValue: { required: !0 },
23
+ modelModifiers: {}
24
+ }),
25
+ emits: ["update:modelValue"],
26
+ setup(t) {
27
+ let n = p(), r = f(t, "modelValue");
28
+ return (o, s) => (l(), i(e, c({
29
+ modelValue: r.value,
30
+ "onUpdate:modelValue": s[0] ||= (e) => r.value = e,
31
+ label: t.label,
32
+ placeholder: t.placeholder,
33
+ name: t.name,
34
+ mask: t.mask,
35
+ required: t.required,
36
+ inputmode: "numeric"
37
+ }, o.$attrs), a({ _: 2 }, [d(n).popover ? {
38
+ name: "popover",
39
+ fn: m(() => [u(o.$slots, "popover")]),
40
+ key: "0"
41
+ } : void 0]), 1040, [
42
+ "modelValue",
43
+ "label",
44
+ "placeholder",
45
+ "name",
46
+ "mask",
47
+ "required"
48
+ ]));
49
+ }
50
+ }), _ = {
51
+ min: 18,
52
+ max: 99
53
+ }, v = "DD-MM-YYYY";
54
+ //#endregion
55
+ //#region src/schemas/birthdateRange.ts
56
+ function y(e, r, i = "ageRange") {
57
+ return {
58
+ name: i,
59
+ test(i, a) {
60
+ let o = t(i, v);
61
+ if (!o) return !0;
62
+ let { today: s, earliest: c, latest: l } = n(e.min, e.max), u = {
63
+ earliest: c,
64
+ latest: l
65
+ };
66
+ return r.future && o.isAfter(s, "day") ? a.createError({ message: r.future(u) }) : o.isAfter(l, "day") ? a.createError({ message: r.tooYoung(u) }) : !o.isBefore(c, "day") || a.createError({ message: r.tooOld(u) });
67
+ }
68
+ };
69
+ }
70
+ //#endregion
71
+ //#region src/schemas/birthdate.schema.ts
72
+ function b(e) {
73
+ return t(e, v) !== null;
74
+ }
75
+ function x(e = _) {
76
+ return h().required(r.birthdate.required).test("date_format", r.birthdate.dateFormat, b).test(y({
77
+ min: {
78
+ value: e.min,
79
+ unit: "year"
80
+ },
81
+ max: {
82
+ value: e.max,
83
+ unit: "year"
84
+ }
85
+ }, {
86
+ tooYoung: () => r.birthdate.tooYoung(e.min),
87
+ tooOld: () => r.birthdate.tooOld(e.max)
88
+ }));
89
+ }
90
+ //#endregion
91
+ export { g as a, v as i, b as n, y as r, x as t };
@@ -0,0 +1,121 @@
1
+ import { i as e, o as t, r as n, s as r, t as i, u as a } from "./useValidator-B8ZuqyvJ.js";
2
+ import { n as o, r as s, t as c } from "./company.schema-DStHJpGH.js";
3
+ import { t as l } from "./VdPopover-B78nVpNU.js";
4
+ import { n as u, t as d } from "./useLicensePlate-wAVrX9tr.js";
5
+ import { computed as f, createBlock as p, createCommentVNode as m, createVNode as h, defineComponent as g, isRef as _, mergeDefaults as v, mergeProps as y, openBlock as b, unref as x, withCtx as S } from "vue";
6
+ import { object as C } from "yup";
7
+ //#region src/comparisons/car-business/businessCar.schema.ts
8
+ var w = (e) => C({
9
+ licensePlate: e,
10
+ company: c()
11
+ }), T = /* @__PURE__ */ g({
12
+ __name: "BusinessCarForm",
13
+ props: /*@__PURE__*/ v({
14
+ initialData: {},
15
+ title: {},
16
+ description: {},
17
+ banner: {},
18
+ layout: {},
19
+ card: { type: Boolean },
20
+ flat: { type: Boolean },
21
+ fullWidth: { type: Boolean },
22
+ submitLabel: {},
23
+ submitDisabled: { type: Boolean }
24
+ }, {
25
+ ...t,
26
+ title: "Zakelijke autoverzekering vergelijken"
27
+ }),
28
+ emits: ["submitted"],
29
+ setup(t, { emit: c }) {
30
+ let g = t, v = r(g), C = c, { vehicleData: T, licensePlateSchema: E } = d(a.Car, { initialData: g.initialData?.vehicle ?? void 0 }), { isSubmitting: D, handleSubmit: O, defineField: k, setErrors: A, removeError: j } = i(w(E), {
31
+ licensePlate: g.initialData?.licensePlate ?? "",
32
+ company: g.initialData?.company ?? null
33
+ }), [M, N, P, F] = k("licensePlate"), [I, L, R] = k("company"), z = (e) => e ? A({ company: e }) : j("company"), B = f(() => !!I.value && !I.value.hasVisitingAddress);
34
+ function V() {
35
+ O(({ licensePlate: e, company: t }) => {
36
+ C("submitted", {
37
+ licensePlate: e,
38
+ company: t,
39
+ vehicle: T.value
40
+ });
41
+ });
42
+ }
43
+ return (r, i) => (b(), p(x(n), y(x(v), {
44
+ "submit-disabled": t.submitDisabled || x(D) || B.value,
45
+ onSubmit: V
46
+ }), {
47
+ default: S(() => [h(x(e), {
48
+ span: "5",
49
+ md: "6"
50
+ }, {
51
+ default: S(() => [h(x(u), y({
52
+ modelValue: x(M),
53
+ "onUpdate:modelValue": i[0] ||= (e) => _(M) ? M.value = e : null,
54
+ "vehicle-data": x(T),
55
+ "onUpdate:vehicleData": i[1] ||= (e) => _(T) ? T.value = e : null,
56
+ name: "licensePlate",
57
+ "error-message": x(P),
58
+ loading: x(F).isValidating
59
+ }, x(N)), {
60
+ popover: S(() => [h(x(l), {
61
+ "ref-variant": "blue-icon",
62
+ "tooltip-variant": "blue",
63
+ "tooltip-size": "small",
64
+ content: {
65
+ title: "Kentekengegevens",
66
+ description: "Op basis van je kenteken halen we automatisch de technische gegevens van je auto op voor een exacte premieberekening."
67
+ }
68
+ })]),
69
+ _: 1
70
+ }, 16, [
71
+ "modelValue",
72
+ "vehicle-data",
73
+ "error-message",
74
+ "loading"
75
+ ])]),
76
+ _: 1
77
+ }), h(x(e), {
78
+ span: "5",
79
+ md: "6"
80
+ }, {
81
+ default: S(() => [h(x(o), y({
82
+ modelValue: x(I),
83
+ "onUpdate:modelValue": i[2] ||= (e) => _(I) ? I.value = e : null,
84
+ name: "company",
85
+ "error-message": x(R)
86
+ }, x(L), { onError: z }), {
87
+ popover: S(() => [h(x(l), {
88
+ "ref-variant": "blue-icon",
89
+ "tooltip-variant": "blue",
90
+ "tooltip-size": "small",
91
+ content: {
92
+ title: "Bedrijfsgegevens",
93
+ description: "Op basis van je KvK-registratie krijgt de verzekeraar direct inzicht in je bedrijfsactiviteiten, de regio waarin je rijdt en de grootte van je team. Deze factoren bepalen samen het risicoprofiel en de hoogte van je premie."
94
+ }
95
+ })]),
96
+ _: 1
97
+ }, 16, ["modelValue", "error-message"]), B.value ? (b(), p(x(s), {
98
+ key: 0,
99
+ style: { "margin-top": "12px" },
100
+ text: "Dit bedrijf heeft geen geregistreerd bezoekadres. Voeg dit toe bij de KvK om door te gaan met de aanvraag."
101
+ })) : m("", !0)]),
102
+ _: 1
103
+ })]),
104
+ _: 1
105
+ }, 16, ["submit-disabled"]));
106
+ }
107
+ });
108
+ //#endregion
109
+ //#region src/comparisons/car-business/businessCar.presenter.ts
110
+ function E(e) {
111
+ return {
112
+ comparison: a.CarBusiness,
113
+ detail: {
114
+ car: { ...e.vehicle },
115
+ companyData: { ...e.company }
116
+ },
117
+ user: {}
118
+ };
119
+ }
120
+ //#endregion
121
+ export { T as n, E as t };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./businessLiability.presenter-8iyRbLgw.js";
2
+ export { e as Form, t as presenter };
@@ -0,0 +1,80 @@
1
+ import { i as e, o as t, r as n, s as r, t as i, u as a } from "./useValidator-B8ZuqyvJ.js";
2
+ import { n as o, r as s, t as c } from "./company.schema-DStHJpGH.js";
3
+ import { t as l } from "./VdPopover-B78nVpNU.js";
4
+ import { computed as u, createBlock as d, createCommentVNode as f, createVNode as p, defineComponent as m, isRef as h, mergeDefaults as g, mergeProps as _, openBlock as v, unref as y, withCtx as b } from "vue";
5
+ import { object as x } from "yup";
6
+ //#region src/comparisons/businessLiability/businessLiability.schema.ts
7
+ var S = x({ company: c() }), C = /* @__PURE__ */ m({
8
+ __name: "BusinessLiabilityForm",
9
+ props: /*@__PURE__*/ g({
10
+ initialData: {},
11
+ title: {},
12
+ description: {},
13
+ banner: {},
14
+ layout: {},
15
+ card: { type: Boolean },
16
+ flat: { type: Boolean },
17
+ fullWidth: { type: Boolean },
18
+ submitLabel: {},
19
+ submitDisabled: { type: Boolean }
20
+ }, {
21
+ ...t,
22
+ title: "Vergelijk aansprakelijkheids-verzekeringen voor jouw bedrijf",
23
+ description: "Bescherm jouw bedrijf slim en voordelig. Om te starten hebben we je bedrijfsnaam of KVK-nummer nodig!",
24
+ submitLabel: "Start gratis vergelijken"
25
+ }),
26
+ emits: ["submitted"],
27
+ setup(t, { emit: a }) {
28
+ let c = t, m = r(c), g = a, { isSubmitting: x, handleSubmit: C, defineField: w, setErrors: T, removeError: E } = i(S, { company: c.initialData?.company ?? null }), [D, O, k] = w("company"), A = (e) => e ? T({ company: e }) : E("company"), j = u(() => !!D.value && !D.value.hasVisitingAddress);
29
+ function M() {
30
+ C(({ company: e }) => {
31
+ g("submitted", { company: e });
32
+ });
33
+ }
34
+ return (t, r) => (v(), d(y(n), _(y(m), {
35
+ "action-span": 4,
36
+ "submit-disabled": y(x) || j.value,
37
+ onSubmit: M
38
+ }), {
39
+ default: b(() => [p(y(e), {
40
+ span: "8",
41
+ md: "6"
42
+ }, {
43
+ default: b(() => [p(y(o), _({
44
+ modelValue: y(D),
45
+ "onUpdate:modelValue": r[0] ||= (e) => h(D) ? D.value = e : null,
46
+ name: "company",
47
+ "error-message": y(k)
48
+ }, y(O), { onError: A }), {
49
+ popover: b(() => [p(y(l), {
50
+ "ref-variant": "blue-icon",
51
+ "tooltip-variant": "blue",
52
+ "tooltip-size": "small",
53
+ content: {
54
+ title: "Bedrijfsgegevens",
55
+ description: "Op basis van je KvK-registratie krijgt de verzekeraar direct inzicht in je bedrijfsactiviteiten, de regio waarin je rijdt en de grootte van je team. Deze factoren bepalen samen het risicoprofiel en de hoogte van je premie."
56
+ }
57
+ })]),
58
+ _: 1
59
+ }, 16, ["modelValue", "error-message"]), j.value ? (v(), d(y(s), {
60
+ key: 0,
61
+ style: { "margin-top": "12px" },
62
+ text: "Dit bedrijf heeft geen geregistreerd bezoekadres. Voeg dit toe bij de KvK om door te gaan met de aanvraag."
63
+ })) : f("", !0)]),
64
+ _: 1
65
+ })]),
66
+ _: 1
67
+ }, 16, ["submit-disabled"]));
68
+ }
69
+ });
70
+ //#endregion
71
+ //#region src/comparisons/businessLiability/businessLiability.presenter.ts
72
+ function w(e) {
73
+ return {
74
+ comparison: a.BusinessLiability,
75
+ detail: { companyData: { ...e.company } },
76
+ user: {}
77
+ };
78
+ }
79
+ //#endregion
80
+ export { C as n, w as t };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./businessCar.presenter-DR-Ozf6B.js";
2
+ export { e as Form, t as presenter };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./car.presenter-gd62kiqS.js";
2
+ export { e as Form, t as presenter };
@@ -0,0 +1,130 @@
1
+ import { i as e, o as t, r as n, s as r, t as i, u as a } from "./useValidator-B8ZuqyvJ.js";
2
+ import { t as o } from "./familyComposition.enum-D26VYo_a.js";
3
+ import { t as s } from "./VdPopover-B78nVpNU.js";
4
+ import { n as c, t as l } from "./useAddress-C-h1pGI5.js";
5
+ import { a as u, t as d } from "./birthdate.schema-B9q6IeIR.js";
6
+ import { n as f, t as p } from "./useLicensePlate-wAVrX9tr.js";
7
+ import { createBlock as m, createVNode as h, defineComponent as g, isRef as _, mergeDefaults as v, mergeProps as y, openBlock as b, unref as x, withCtx as S } from "vue";
8
+ import { object as C } from "yup";
9
+ //#region src/comparisons/car/car.schema.ts
10
+ var w = (e, t) => C({
11
+ licensePlate: e,
12
+ address: t,
13
+ birthdate: d()
14
+ }), T = /* @__PURE__ */ g({
15
+ __name: "CarForm",
16
+ props: /*@__PURE__*/ v({
17
+ initialData: {},
18
+ title: {},
19
+ description: {},
20
+ banner: {},
21
+ layout: {},
22
+ card: { type: Boolean },
23
+ flat: { type: Boolean },
24
+ fullWidth: { type: Boolean },
25
+ submitLabel: {},
26
+ submitDisabled: { type: Boolean }
27
+ }, {
28
+ ...t,
29
+ title: "Autoverzekering vergelijken"
30
+ }),
31
+ emits: ["submitted"],
32
+ setup(t, { emit: o }) {
33
+ let d = t, g = r(d), v = o, { addressSchema: C, draft: T, resolvedAddress: E, additionOptions: D } = l({ initial: d.initialData?.address }), { vehicleData: O, licensePlateSchema: k } = p(a.Car, { initialData: d.initialData?.vehicle ?? void 0 }), { isSubmitting: A, handleSubmit: j, defineField: M } = i(w(k, C), {
34
+ licensePlate: d.initialData?.licensePlate ?? "",
35
+ birthdate: d.initialData?.birthdate ?? "",
36
+ address: T
37
+ }), [N, P, F, I] = M("licensePlate"), [L, R, z] = M("birthdate");
38
+ function B() {
39
+ j(({ licensePlate: e, birthdate: t }) => {
40
+ v("submitted", {
41
+ licensePlate: e,
42
+ birthdate: t,
43
+ address: E.value,
44
+ vehicle: O.value
45
+ });
46
+ });
47
+ }
48
+ return (r, i) => (b(), m(x(n), y(x(g), {
49
+ "submit-disabled": t.submitDisabled || x(A),
50
+ onSubmit: B
51
+ }), {
52
+ default: S(() => [
53
+ h(x(e), {
54
+ span: "3",
55
+ md: "6"
56
+ }, {
57
+ default: S(() => [h(x(f), y({
58
+ modelValue: x(N),
59
+ "onUpdate:modelValue": i[0] ||= (e) => _(N) ? N.value = e : null,
60
+ "vehicle-data": x(O),
61
+ "onUpdate:vehicleData": i[1] ||= (e) => _(O) ? O.value = e : null,
62
+ name: "licensePlate",
63
+ "error-message": x(F),
64
+ loading: x(I).isValidating
65
+ }, x(P)), {
66
+ popover: S(() => [h(x(s), {
67
+ "ref-variant": "blue-icon",
68
+ "tooltip-variant": "blue",
69
+ "tooltip-size": "small",
70
+ content: {
71
+ title: "Kentekengegevens",
72
+ description: "Op basis van je kenteken halen we automatisch de technische gegevens van je auto op voor een exacte premieberekening."
73
+ }
74
+ })]),
75
+ _: 1
76
+ }, 16, [
77
+ "modelValue",
78
+ "vehicle-data",
79
+ "error-message",
80
+ "loading"
81
+ ])]),
82
+ _: 1
83
+ }),
84
+ h(x(e), {
85
+ span: "4",
86
+ md: "6"
87
+ }, {
88
+ default: S(() => [h(x(c), {
89
+ "resolved-address": x(E),
90
+ "onUpdate:resolvedAddress": i[2] ||= (e) => _(E) ? E.value = e : null,
91
+ "addition-options": x(D)
92
+ }, null, 8, ["resolved-address", "addition-options"])]),
93
+ _: 1
94
+ }),
95
+ h(x(e), {
96
+ span: "3",
97
+ md: "6"
98
+ }, {
99
+ default: S(() => [h(x(u), y({
100
+ modelValue: x(L),
101
+ "onUpdate:modelValue": i[3] ||= (e) => _(L) ? L.value = e : null,
102
+ label: "Geboortedatum hoofdbestuurder",
103
+ "error-message": x(z)
104
+ }, x(R)), null, 16, ["modelValue", "error-message"])]),
105
+ _: 1
106
+ })
107
+ ]),
108
+ _: 1
109
+ }, 16, ["submit-disabled"]));
110
+ }
111
+ });
112
+ //#endregion
113
+ //#region src/comparisons/car/car.presenter.ts
114
+ function E(e) {
115
+ return {
116
+ comparison: a.Car,
117
+ detail: { car: { ...e.vehicle } },
118
+ user: {
119
+ zipCode: e.address.zipCode,
120
+ houseNumber: e.address.houseNumber,
121
+ houseNumberAddition: e.address.houseNumberAddition,
122
+ birthdate: e.birthdate,
123
+ street: e.address.street,
124
+ city: e.address.city,
125
+ familyComposition: o.SingleWithoutChildren
126
+ }
127
+ };
128
+ }
129
+ //#endregion
130
+ export { T as n, E as t };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./caravan.presenter-Cr5vuB_r.js";
2
+ export { e as Form, t as presenter };
@@ -0,0 +1,157 @@
1
+ import { i as e, o as t, r as n, s as r, t as i, u as a } from "./useValidator-B8ZuqyvJ.js";
2
+ import { n as o, t as s } from "./yesNo-BvJlCm7Y.js";
3
+ import { t as c } from "./VdSelect-Dv35x4sz.js";
4
+ import { t as l } from "./VdRadioGroup-D5kHcpsY.js";
5
+ import { n as u } from "./date.util-DjJZwKvn.js";
6
+ import { t as d } from "./messages-DRFu-PCu.js";
7
+ import { n as f, r as p } from "./rules-3BZkSj_K.js";
8
+ import { createBlock as m, createVNode as h, defineComponent as g, isRef as _, mergeDefaults as v, mergeProps as y, openBlock as b, unref as x, withCtx as S } from "vue";
9
+ import { object as C } from "yup";
10
+ //#region src/comparisons/caravan/caravan.schema.ts
11
+ var w = C({
12
+ TypeOfCaravan: p(d.caravan.typeOfCaravanRequired),
13
+ NewOrOccasion: f(s, d.caravan.newOrOccasionRequired),
14
+ BuildYear: p(d.caravan.buildYearRequired)
15
+ }), T = [
16
+ {
17
+ value: "CS",
18
+ title: "Stacaravan"
19
+ },
20
+ {
21
+ value: "CT",
22
+ title: "Toercaravan"
23
+ },
24
+ {
25
+ value: "CV",
26
+ title: "Vouwwagen"
27
+ }
28
+ ], E = [{
29
+ value: o.Yes,
30
+ label: "Nieuw"
31
+ }, {
32
+ value: o.No,
33
+ label: "Occasion"
34
+ }];
35
+ //#endregion
36
+ //#region src/comparisons/caravan/models/buildYears.model.ts
37
+ function D() {
38
+ let e = u();
39
+ return Array.from({ length: 126 }, (t, n) => ({
40
+ title: String(e - n),
41
+ value: String(e - n)
42
+ }));
43
+ }
44
+ //#endregion
45
+ //#region src/comparisons/caravan/CaravanForm.vue
46
+ var O = /* @__PURE__ */ g({
47
+ __name: "CaravanForm",
48
+ props: /*@__PURE__*/ v({
49
+ initialData: {},
50
+ title: {},
51
+ description: {},
52
+ banner: {},
53
+ layout: {},
54
+ card: { type: Boolean },
55
+ flat: { type: Boolean },
56
+ fullWidth: { type: Boolean },
57
+ submitLabel: {},
58
+ submitDisabled: { type: Boolean }
59
+ }, {
60
+ ...t,
61
+ title: "Caravanverzekering vergelijken"
62
+ }),
63
+ emits: ["submitted"],
64
+ setup(t, { emit: a }) {
65
+ let s = t, u = r(s), d = a, f = D(), { isSubmitting: p, handleSubmit: g, defineField: v } = i(w, {
66
+ TypeOfCaravan: s.initialData?.TypeOfCaravan ?? null,
67
+ NewOrOccasion: s.initialData?.NewOrOccasion ?? o.Yes,
68
+ BuildYear: s.initialData?.BuildYear ?? null
69
+ }), [C, O, k] = v("TypeOfCaravan", { validateAt: "change" }), [A, j, M] = v("NewOrOccasion"), [N, P, F] = v("BuildYear", { validateAt: "change" });
70
+ function I() {
71
+ g((e) => {
72
+ d("submitted", { ...e });
73
+ });
74
+ }
75
+ return (r, i) => (b(), m(x(n), y(x(u), {
76
+ "submit-disabled": t.submitDisabled || x(p),
77
+ onSubmit: I
78
+ }), {
79
+ default: S(() => [
80
+ h(x(e), {
81
+ span: "4",
82
+ md: "6"
83
+ }, {
84
+ default: S(() => [h(x(c), y({
85
+ modelValue: x(C),
86
+ "onUpdate:modelValue": i[0] ||= (e) => _(C) ? C.value = e : null,
87
+ label: "Soort caravan",
88
+ options: x(T),
89
+ name: "typeOfCaravan",
90
+ required: !1,
91
+ "error-message": x(k)
92
+ }, x(O)), null, 16, [
93
+ "modelValue",
94
+ "options",
95
+ "error-message"
96
+ ])]),
97
+ _: 1
98
+ }),
99
+ h(x(e), {
100
+ span: "4",
101
+ md: "6"
102
+ }, {
103
+ default: S(() => [h(x(l), y({
104
+ modelValue: x(A),
105
+ "onUpdate:modelValue": i[1] ||= (e) => _(A) ? A.value = e : null,
106
+ legend: "Gekocht als",
107
+ name: "newOrOccasion",
108
+ options: x(E),
109
+ variant: "boxed",
110
+ required: !1,
111
+ "error-message": x(M)
112
+ }, x(j)), null, 16, [
113
+ "modelValue",
114
+ "options",
115
+ "error-message"
116
+ ])]),
117
+ _: 1
118
+ }),
119
+ h(x(e), {
120
+ span: "2",
121
+ md: "6"
122
+ }, {
123
+ default: S(() => [h(x(c), y({
124
+ modelValue: x(N),
125
+ "onUpdate:modelValue": i[2] ||= (e) => _(N) ? N.value = e : null,
126
+ label: "Bouwjaar",
127
+ options: x(f),
128
+ name: "buildYear",
129
+ required: !1,
130
+ "error-message": x(F)
131
+ }, x(P)), null, 16, [
132
+ "modelValue",
133
+ "options",
134
+ "error-message"
135
+ ])]),
136
+ _: 1
137
+ })
138
+ ]),
139
+ _: 1
140
+ }, 16, ["submit-disabled"]));
141
+ }
142
+ });
143
+ //#endregion
144
+ //#region src/comparisons/caravan/caravan.presenter.ts
145
+ function k(e) {
146
+ return {
147
+ comparison: a.Caravan,
148
+ detail: { caravan: {
149
+ TypeOfCaravan: e.TypeOfCaravan,
150
+ NewOrOccasion: e.NewOrOccasion,
151
+ BuildYear: e.BuildYear
152
+ } },
153
+ user: {}
154
+ };
155
+ }
156
+ //#endregion
157
+ export { O as n, k as t };