@konnectio/core 4.0.17 → 4.0.19

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 (90) hide show
  1. package/dist/ActionField-4cb5a734.js +100 -0
  2. package/dist/ActionField-4cb5a734.js.br +0 -0
  3. package/dist/ActionField-656d204b.cjs +1 -0
  4. package/dist/AvailabilitySkeleton-00f7fc68.js +223 -0
  5. package/dist/AvailabilitySkeleton-00f7fc68.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-8fc17074.cjs +1 -0
  7. package/dist/{DateField.vue_vue_type_style_index_0_lang-d5a1efd5.js → DateField.vue_vue_type_style_index_0_lang-36b7ee9e.js} +2323 -2323
  8. package/dist/DateField.vue_vue_type_style_index_0_lang-36b7ee9e.js.br +0 -0
  9. package/dist/DateField.vue_vue_type_style_index_0_lang-ef9c83d6.cjs +5 -0
  10. package/dist/Field-4283160f.cjs +1 -0
  11. package/dist/{Field-7137ef85.js → Field-e1af1bbc.js} +11 -12
  12. package/dist/Field-e1af1bbc.js.br +0 -0
  13. package/dist/NumberField.vue_vue_type_script_setup_true_lang-a517b062.cjs +1 -0
  14. package/dist/NumberField.vue_vue_type_script_setup_true_lang-eb9876fc.js +116 -0
  15. package/dist/NumberField.vue_vue_type_script_setup_true_lang-eb9876fc.js.br +0 -0
  16. package/dist/SelectField.vue_vue_type_style_index_0_lang-1c999286.js +28840 -0
  17. package/dist/SelectField.vue_vue_type_style_index_0_lang-1c999286.js.br +0 -0
  18. package/dist/SelectField.vue_vue_type_style_index_0_lang-af7c016a.cjs +855 -0
  19. package/dist/ThankYou-01175a37.cjs +54 -0
  20. package/dist/{ThankYou-433bd249.js → ThankYou-0860a0ab.js} +436 -430
  21. package/dist/ThankYou-0860a0ab.js.br +0 -0
  22. package/dist/{_-048b5217.js → _-6db0e1a4.js} +16 -17
  23. package/dist/_-6db0e1a4.js.br +0 -0
  24. package/dist/_-b5842a21.cjs +1 -0
  25. package/dist/_commonjsHelpers-6763f629.cjs +1 -0
  26. package/dist/_commonjsHelpers-aeeeeb92.js +30 -0
  27. package/dist/assets/typescript/mixins.d.ts +1 -0
  28. package/dist/availability.cjs +2 -2
  29. package/dist/availability.js +30 -31
  30. package/dist/availability.js.br +0 -0
  31. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
  32. package/dist/components/forms/MultiStepForm.vue.d.ts +1 -1
  33. package/dist/components/forms/ReservationForm.vue.d.ts +1 -1
  34. package/dist/components/listings/Base.vue.d.ts +1 -1
  35. package/dist/components/listings/Hotel.vue.d.ts +1 -1
  36. package/dist/{event-3ef40faf.js → event-52fce8cc.js} +29 -30
  37. package/dist/event-52fce8cc.js.br +0 -0
  38. package/dist/event-c717dc05.cjs +1 -0
  39. package/dist/event.cjs +1 -1
  40. package/dist/event.js +233 -235
  41. package/dist/event.js.br +0 -0
  42. package/dist/gift-card-validation.cjs +1 -1
  43. package/dist/gift-card-validation.js +53 -55
  44. package/dist/gift-card-validation.js.br +0 -0
  45. package/dist/gift-card.cjs +1 -1
  46. package/dist/gift-card.js +186 -188
  47. package/dist/gift-card.js.br +0 -0
  48. package/dist/hotel.cjs +5 -5
  49. package/dist/hotel.js +1462 -1328
  50. package/dist/hotel.js.br +0 -0
  51. package/dist/{index-36d9ed45.js → index-4aff7f4e.js} +14 -16
  52. package/dist/index-4aff7f4e.js.br +0 -0
  53. package/dist/index-5d223c1a.cjs +1 -0
  54. package/dist/polyfill.cjs +2 -2
  55. package/dist/polyfill.js +2 -2
  56. package/dist/polyfill.js.br +0 -0
  57. package/dist/store/hotel.d.ts +4 -1
  58. package/dist/style.css +1 -1
  59. package/dist/style.css.br +0 -0
  60. package/dist/types/index.d.ts +1 -0
  61. package/package.json +1 -1
  62. package/dist/ActionField-3184bffd.cjs +0 -1
  63. package/dist/ActionField-82ef422e.js +0 -164
  64. package/dist/ActionField-82ef422e.js.br +0 -0
  65. package/dist/AvailabilitySkeleton-528d40ef.cjs +0 -1
  66. package/dist/AvailabilitySkeleton-ec092c09.js +0 -203
  67. package/dist/AvailabilitySkeleton-ec092c09.js.br +0 -0
  68. package/dist/DateField.vue_vue_type_style_index_0_lang-5692c5b2.cjs +0 -5
  69. package/dist/DateField.vue_vue_type_style_index_0_lang-d5a1efd5.js.br +0 -0
  70. package/dist/Field-7137ef85.js.br +0 -0
  71. package/dist/Field-b1690485.cjs +0 -1
  72. package/dist/NumberField.vue_vue_type_style_index_0_lang-8c28c1dd.cjs +0 -1
  73. package/dist/NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js +0 -194
  74. package/dist/NumberField.vue_vue_type_style_index_0_lang-eebde8cd.js.br +0 -0
  75. package/dist/SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js +0 -19741
  76. package/dist/SelectField.vue_vue_type_style_index_0_lang-5e1192e9.js.br +0 -0
  77. package/dist/SelectField.vue_vue_type_style_index_0_lang-c0715ca3.cjs +0 -850
  78. package/dist/ThankYou-433bd249.js.br +0 -0
  79. package/dist/ThankYou-817b93d0.cjs +0 -54
  80. package/dist/_-048b5217.js.br +0 -0
  81. package/dist/_-120d9090.cjs +0 -1
  82. package/dist/_commonjsHelpers-10dfc225.js +0 -8
  83. package/dist/_commonjsHelpers-87b0abe8.cjs +0 -1
  84. package/dist/applyGiftCard-45cf782e.js +0 -54
  85. package/dist/applyGiftCard-45cf782e.js.br +0 -0
  86. package/dist/applyGiftCard-f1b620cc.cjs +0 -1
  87. package/dist/event-3ef40faf.js.br +0 -0
  88. package/dist/event-d531df9d.cjs +0 -1
  89. package/dist/index-36d9ed45.js.br +0 -0
  90. package/dist/index-8309eba2.cjs +0 -1
@@ -0,0 +1,100 @@
1
+ import { h as f, j as V, c as m, k as d, l as i, w as v, x as g, y as q, n as t, T as k, m as B, C as I, I as C, _ as F } from "./SelectField.vue_vue_type_style_index_0_lang-1c999286.js";
2
+ import { _ as A } from "./NumberField.vue_vue_type_script_setup_true_lang-eb9876fc.js";
3
+ const h = { class: "fresh-booking-action-field" }, L = /* @__PURE__ */ f({
4
+ __name: "ActionField",
5
+ props: {
6
+ modelValue: {},
7
+ label: {},
8
+ buttonLabel: {},
9
+ buttonIcon: {},
10
+ buttonIconColor: {},
11
+ buttonDisabled: { type: Boolean, default: !1 },
12
+ secondary: { type: Boolean, default: !1 },
13
+ name: {},
14
+ id: {},
15
+ type: { default: "text" },
16
+ placeholder: {},
17
+ icon: {},
18
+ iconType: { default: "fal" },
19
+ required: { type: Boolean, default: !1 },
20
+ readonly: { type: Boolean, default: !1 },
21
+ data: {},
22
+ action: {},
23
+ minValue: {},
24
+ maxValue: {},
25
+ isLoading: { type: Boolean, default: !1 }
26
+ },
27
+ emits: ["update:modelValue", "action"],
28
+ setup(y, { emit: b }) {
29
+ const s = b, u = y, o = u.id || V();
30
+ function r(e) {
31
+ s("update:modelValue", e);
32
+ }
33
+ const n = m({
34
+ get: () => u.modelValue,
35
+ set: (e) => r(e)
36
+ }), p = m({
37
+ get: () => u.modelValue,
38
+ set: (e) => r(e)
39
+ });
40
+ function c() {
41
+ s("action");
42
+ }
43
+ return (e, a) => (d(), i(C, {
44
+ label: e.label,
45
+ id: t(o),
46
+ icon: e.icon,
47
+ "icon-type": e.iconType,
48
+ required: e.required,
49
+ type: e.type,
50
+ readonly: e.readonly
51
+ }, {
52
+ default: v(() => [
53
+ g("div", h, [
54
+ e.type === "dropdown" && e.data ? (d(), i(q, {
55
+ key: 0,
56
+ modelValue: n.value,
57
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => n.value = l),
58
+ id: t(o),
59
+ options: e.data,
60
+ name: e.name,
61
+ required: e.required,
62
+ placeholder: e.placeholder
63
+ }, null, 8, ["modelValue", "id", "options", "name", "required", "placeholder"])) : e.type === "number" ? (d(), i(A, {
64
+ key: 1,
65
+ modelValue: p.value,
66
+ "onUpdate:modelValue": a[1] || (a[1] = (l) => p.value = l),
67
+ id: t(o),
68
+ "min-value": e.minValue,
69
+ "max-value": e.maxValue
70
+ }, null, 8, ["modelValue", "id", "min-value", "max-value"])) : (d(), i(k, {
71
+ key: 2,
72
+ modelValue: n.value,
73
+ "onUpdate:modelValue": a[2] || (a[2] = (l) => n.value = l),
74
+ id: t(o),
75
+ name: e.name,
76
+ required: e.required,
77
+ placeholder: e.placeholder
78
+ }, null, 8, ["modelValue", "id", "name", "required", "placeholder"])),
79
+ B(I, {
80
+ "data-test": `${e.name}Submit`,
81
+ icon: e.buttonIcon,
82
+ label: e.buttonLabel,
83
+ "icon-color": e.buttonIconColor,
84
+ styling: e.action,
85
+ type: "button",
86
+ "is-loading": e.isLoading,
87
+ disabled: e.buttonDisabled,
88
+ secondary: e.secondary,
89
+ onClickEvent: a[3] || (a[3] = (l) => c())
90
+ }, null, 8, ["data-test", "icon", "label", "icon-color", "styling", "is-loading", "disabled", "secondary"])
91
+ ])
92
+ ]),
93
+ _: 1
94
+ }, 8, ["label", "id", "icon", "icon-type", "required", "type", "readonly"]));
95
+ }
96
+ });
97
+ const w = /* @__PURE__ */ F(L, [["__scopeId", "data-v-07d4466b"]]);
98
+ export {
99
+ w as A
100
+ };
Binary file
@@ -0,0 +1 @@
1
+ "use strict";const l=require("./SelectField.vue_vue_type_style_index_0_lang-af7c016a.cjs"),c=require("./NumberField.vue_vue_type_script_setup_true_lang-a517b062.cjs"),y={class:"fresh-booking-action-field"},b=l.defineComponent({__name:"ActionField",props:{modelValue:{},label:{},buttonLabel:{},buttonIcon:{},buttonIconColor:{},buttonDisabled:{type:Boolean,default:!1},secondary:{type:Boolean,default:!1},name:{},id:{},type:{default:"text"},placeholder:{},icon:{},iconType:{default:"fal"},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},data:{},action:{},minValue:{},maxValue:{},isLoading:{type:Boolean,default:!1}},emits:["update:modelValue","action"],setup(s,{emit:p}){const i=p,t=s,n=t.id||l.ranId();function u(e){i("update:modelValue",e)}const d=l.computed({get:()=>t.modelValue,set:e=>u(e)}),r=l.computed({get:()=>t.modelValue,set:e=>u(e)});function m(){i("action")}return(e,o)=>(l.openBlock(),l.createBlock(l.InputField,{label:e.label,id:l.unref(n),icon:e.icon,"icon-type":e.iconType,required:e.required,type:e.type,readonly:e.readonly},{default:l.withCtx(()=>[l.createBaseVNode("div",y,[e.type==="dropdown"&&e.data?(l.openBlock(),l.createBlock(l._sfc_main,{key:0,modelValue:d.value,"onUpdate:modelValue":o[0]||(o[0]=a=>d.value=a),id:l.unref(n),options:e.data,name:e.name,required:e.required,placeholder:e.placeholder},null,8,["modelValue","id","options","name","required","placeholder"])):e.type==="number"?(l.openBlock(),l.createBlock(c._sfc_main,{key:1,modelValue:r.value,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value=a),id:l.unref(n),"min-value":e.minValue,"max-value":e.maxValue},null,8,["modelValue","id","min-value","max-value"])):(l.openBlock(),l.createBlock(l.TextField,{key:2,modelValue:d.value,"onUpdate:modelValue":o[2]||(o[2]=a=>d.value=a),id:l.unref(n),name:e.name,required:e.required,placeholder:e.placeholder},null,8,["modelValue","id","name","required","placeholder"])),l.createVNode(l.Clickable,{"data-test":`${e.name}Submit`,icon:e.buttonIcon,label:e.buttonLabel,"icon-color":e.buttonIconColor,styling:e.action,type:"button","is-loading":e.isLoading,disabled:e.buttonDisabled,secondary:e.secondary,onClickEvent:o[3]||(o[3]=a=>m())},null,8,["data-test","icon","label","icon-color","styling","is-loading","disabled","secondary"])])]),_:1},8,["label","id","icon","icon-type","required","type","readonly"]))}});const f=l._export_sfc(b,[["__scopeId","data-v-07d4466b"]]);exports.ActionField=f;
@@ -0,0 +1,223 @@
1
+ import { h as S, r as O, a as T, k as l, q as u, a9 as Q, H as W, z as X, s as x, c as b, a1 as C, o as Y, l as D, w as Z, x as $, n as e, m as s, B as k, y as ee, t as _, a2 as F, T as H, C as ae, v as R, f as le, _ as q } from "./SelectField.vue_vue_type_style_index_0_lang-1c999286.js";
2
+ import { u as E, a as N, _ as te } from "./DateField.vue_vue_type_style_index_0_lang-36b7ee9e.js";
3
+ import { _ as I } from "./NumberField.vue_vue_type_script_setup_true_lang-eb9876fc.js";
4
+ import { E as z } from "./_-6db0e1a4.js";
5
+ import { F as f } from "./Field-e1af1bbc.js";
6
+ const ie = ["onSubmit"], ne = /* @__PURE__ */ S({
7
+ __name: "_",
8
+ props: {
9
+ type: { default: "submit" }
10
+ },
11
+ emits: ["submit"],
12
+ setup(h, { emit: n }) {
13
+ const t = O(!1), r = n, c = h, { verifyRecaptcha: d } = T();
14
+ function v() {
15
+ t.value = !0, d({
16
+ callback: y,
17
+ type: c.type
18
+ }).then(() => t.value = !1);
19
+ }
20
+ function y() {
21
+ r("submit");
22
+ }
23
+ return (V, A) => (l(), u("form", {
24
+ onSubmit: W(v, ["prevent"])
25
+ }, [
26
+ Q(V.$slots, "default", { isLoading: t.value })
27
+ ], 40, ie));
28
+ }
29
+ }), oe = {
30
+ key: 0,
31
+ class: "konnectio-availability-location"
32
+ }, se = { id: "fresh-booking-availability-date-selection" }, re = {
33
+ key: 1,
34
+ id: "fresh-booking-availability-guest-selection"
35
+ }, ue = { id: "fresh-booking-availability-confirmation" }, ce = /* @__PURE__ */ S({
36
+ __name: "HotelAvailabilityForm",
37
+ props: {
38
+ booking: { type: Boolean, default: !1 },
39
+ link: {}
40
+ },
41
+ setup(h) {
42
+ const { t: n } = X(), t = h, {
43
+ adults: r,
44
+ children: c,
45
+ arrivalDate: d,
46
+ departureDate: v,
47
+ location: y,
48
+ isExpired: V
49
+ } = x(E()), { reset: A } = E(), { fetchAvailabilityData: M } = N(), { areListingsLoading: j, hotelList: G, hasHotelList: g } = x(N()), {
50
+ firstSelectableDateOffset: L,
51
+ lastSelectableDateOffset: U,
52
+ disableChildSelection: p,
53
+ disableAdultSelection: m
54
+ } = x(T()), w = O([]), fe = b(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + (L.value - 1)))), _e = b(() => new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + U.value))), ye = b(() => new Date((/* @__PURE__ */ new Date()).setDate(d.value.getDate() + L.value))), De = b(() => new Date((/* @__PURE__ */ new Date()).setDate(d.value.getDate() + (U.value + 1)))), B = b(() => !(!m && r.value === 0)), J = b(() => typeof t.link != "string");
55
+ function K() {
56
+ if (t.booking === !1)
57
+ if (J.value) {
58
+ const o = le();
59
+ t.link[o] ? window.location.replace(t.link[o]) : t.link.en ? window.location.replace(t.link.en) : console.log("Sprog understøttes ikke");
60
+ } else
61
+ window.location.replace(t.link);
62
+ else
63
+ B.value && M();
64
+ }
65
+ return C(d, (o) => {
66
+ const a = new Date(new Date(o).setDate(new Date(o).getDate() + 1));
67
+ new Date(v.value) < a && (v.value = a);
68
+ }), C(w, (o) => {
69
+ d.value = o[0], v.value = o[1];
70
+ }), Y(() => {
71
+ V.value && t.booking && A(), w.value = [d.value, v.value];
72
+ }), (o, a) => (l(), D(ne, {
73
+ id: "konnectio-availability-form",
74
+ class: R({ reservation: o.booking }),
75
+ type: "availability",
76
+ onSubmit: K
77
+ }, {
78
+ default: Z(({ isLoading: P }) => [
79
+ $("ul", {
80
+ id: "konnectio-availability-form-content",
81
+ class: R([
82
+ { "is-not-booking-page": !o.booking },
83
+ { "only-adult-guests": !e(m) && e(p) },
84
+ { "only-child-guests": !e(p) && e(m) },
85
+ { "no-guests": e(m) && e(p) },
86
+ { "all-guests": !e(m) && !e(p) },
87
+ { "has-location": e(g) }
88
+ ])
89
+ }, [
90
+ e(g) ? (l(), u("li", oe, [
91
+ s(ee, {
92
+ modelValue: e(y),
93
+ "onUpdate:modelValue": a[0] || (a[0] = (i) => k(y) ? y.value = i : null),
94
+ label: e(n)("general.location"),
95
+ icon: "location-dot",
96
+ "icon-type": "fas",
97
+ "icon-placement": "label",
98
+ options: e(G),
99
+ searchable: !1
100
+ }, null, 8, ["modelValue", "label", "options"])
101
+ ])) : _("", !0),
102
+ $("li", se, [
103
+ s(te, {
104
+ modelValue: w.value,
105
+ "onUpdate:modelValue": a[1] || (a[1] = (i) => w.value = i),
106
+ label: e(n)("availability.checkInOut"),
107
+ "icon-type": "fas",
108
+ "icon-placement": "label",
109
+ "min-range": 1,
110
+ range: ""
111
+ }, null, 8, ["modelValue", "label"]),
112
+ _("", !0)
113
+ ]),
114
+ !e(m) || !e(p) ? (l(), u("li", re, [
115
+ e(m) ? _("", !0) : (l(), u(F, { key: 0 }, [
116
+ e(g) ? (l(), D(H, {
117
+ key: 0,
118
+ modelValue: e(r),
119
+ "onUpdate:modelValue": a[4] || (a[4] = (i) => k(r) ? r.value = i : null),
120
+ label: e(n)("availability.adults"),
121
+ "icon-type": "fas",
122
+ "icon-placement": "label",
123
+ name: "adults",
124
+ icon: "male"
125
+ }, null, 8, ["modelValue", "label"])) : (l(), D(I, {
126
+ key: 1,
127
+ modelValue: e(r),
128
+ "onUpdate:modelValue": a[5] || (a[5] = (i) => k(r) ? r.value = i : null),
129
+ label: e(n)("availability.adults"),
130
+ "icon-type": "fas",
131
+ "icon-placement": "label",
132
+ name: "adults",
133
+ icon: "male"
134
+ }, null, 8, ["modelValue", "label"]))
135
+ ], 64)),
136
+ e(p) ? _("", !0) : (l(), u(F, { key: 1 }, [
137
+ e(g) ? (l(), D(H, {
138
+ key: 0,
139
+ modelValue: e(c),
140
+ "onUpdate:modelValue": a[6] || (a[6] = (i) => k(c) ? c.value = i : null),
141
+ label: e(n)("availability.children"),
142
+ "icon-type": "fas",
143
+ "icon-placement": "label",
144
+ name: "children",
145
+ icon: "child"
146
+ }, null, 8, ["modelValue", "label"])) : (l(), D(I, {
147
+ key: 1,
148
+ modelValue: e(c),
149
+ "onUpdate:modelValue": a[7] || (a[7] = (i) => k(c) ? c.value = i : null),
150
+ label: e(n)("availability.children"),
151
+ "icon-type": "fas",
152
+ "icon-placement": "label",
153
+ name: "children",
154
+ icon: "child"
155
+ }, null, 8, ["modelValue", "label"]))
156
+ ], 64))
157
+ ])) : _("", !0),
158
+ $("li", ue, [
159
+ s(ae, {
160
+ type: "submit",
161
+ label: e(n)("availability.buttonLabel"),
162
+ disabled: !B.value,
163
+ "is-loading": e(j) || P
164
+ }, null, 8, ["label", "disabled", "is-loading"])
165
+ ])
166
+ ], 2)
167
+ ]),
168
+ _: 1
169
+ }, 8, ["class"]));
170
+ }
171
+ });
172
+ const xe = /* @__PURE__ */ q(ce, [["__scopeId", "data-v-4e84897d"]]), de = { class: "availability-skeleton" }, me = {
173
+ key: 0,
174
+ class: "availability-skeleton-navigation"
175
+ }, ve = {
176
+ key: 1,
177
+ class: "availability-skeleton-hotel"
178
+ }, pe = {
179
+ key: 2,
180
+ class: "availability-skeleton-event"
181
+ }, be = /* @__PURE__ */ S({
182
+ __name: "AvailabilitySkeleton",
183
+ props: {
184
+ view: { default: "hotel" }
185
+ },
186
+ setup(h) {
187
+ return (n, t) => (l(), u("div", de, [
188
+ n.view === "both" ? (l(), u("div", me, [
189
+ s(z, {
190
+ height: "28px",
191
+ width: "60px",
192
+ "border-radius": "20px"
193
+ }),
194
+ s(z, {
195
+ height: "28px",
196
+ width: "60px",
197
+ "border-radius": "20px"
198
+ })
199
+ ])) : _("", !0),
200
+ n.view !== "event" ? (l(), u("div", ve, [
201
+ s(f, { "with-icon": "" }),
202
+ s(f, { "with-icon": "" }),
203
+ s(f, { "with-icon": "" }),
204
+ s(f, {
205
+ "with-icon": "",
206
+ "no-label": ""
207
+ })
208
+ ])) : (l(), u("div", pe, [
209
+ s(f, { "with-icon": "" }),
210
+ s(f, {
211
+ "with-icon": "",
212
+ "no-label": ""
213
+ })
214
+ ]))
215
+ ]));
216
+ }
217
+ });
218
+ const $e = /* @__PURE__ */ q(be, [["__scopeId", "data-v-c266ccbc"]]);
219
+ export {
220
+ $e as A,
221
+ xe as H,
222
+ ne as _
223
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-af7c016a.cjs"),m=require("./DateField.vue_vue_type_style_index_0_lang-ef9c83d6.cjs"),h=require("./NumberField.vue_vue_type_script_setup_true_lang-a517b062.cjs"),x=require("./_-b5842a21.cjs"),_=require("./Field-4283160f.cjs"),E=["onSubmit"],w=e.defineComponent({__name:"_",props:{type:{default:"submit"}},emits:["submit"],setup(p,{emit:n}){const l=e.ref(!1),o=n,u=p,{verifyRecaptcha:c}=e.useUtilityStore();function r(){l.value=!0,c({callback:v,type:u.type}).then(()=>l.value=!1)}function v(){o("submit")}return(b,k)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(r,["prevent"])},[e.renderSlot(b.$slots,"default",{isLoading:l.value})],40,E))}}),R={key:0,class:"konnectio-availability-location"},$={id:"fresh-booking-availability-date-selection"},L={key:1,id:"fresh-booking-availability-guest-selection"},U={id:"fresh-booking-availability-confirmation"},H=e.defineComponent({__name:"HotelAvailabilityForm",props:{booking:{type:Boolean,default:!1},link:{}},setup(p){const{t:n}=e.useI18n(),l=p,{adults:o,children:u,arrivalDate:c,departureDate:r,location:v,isExpired:b}=e.storeToRefs(m.useAvailabilityStore()),{reset:k}=m.useAvailabilityStore(),{fetchAvailabilityData:B}=m.useHotelStore(),{areListingsLoading:F,hotelList:S,hasHotelList:f}=e.storeToRefs(m.useHotelStore()),{firstSelectableDateOffset:g,lastSelectableDateOffset:D,disableChildSelection:d,disableAdultSelection:s}=e.storeToRefs(e.useUtilityStore()),y=e.ref([]),G=e.computed(()=>new Date(new Date().setDate(new Date().getDate()+(g.value-1)))),J=e.computed(()=>new Date(new Date().setDate(new Date().getDate()+D.value))),K=e.computed(()=>new Date(new Date().setDate(c.value.getDate()+g.value))),P=e.computed(()=>new Date(new Date().setDate(c.value.getDate()+(D.value+1)))),V=e.computed(()=>!(!s&&o.value===0)),N=e.computed(()=>typeof l.link!="string");function A(){if(l.booking===!1)if(N.value){const i=e.getUserLanguage();l.link[i]?window.location.replace(l.link[i]):l.link.en?window.location.replace(l.link.en):console.log("Sprog understøttes ikke")}else window.location.replace(l.link);else V.value&&B()}return e.watch(c,i=>{const t=new Date(new Date(i).setDate(new Date(i).getDate()+1));new Date(r.value)<t&&(r.value=t)}),e.watch(y,i=>{c.value=i[0],r.value=i[1]}),e.onMounted(()=>{b.value&&l.booking&&k(),y.value=[c.value,r.value]}),(i,t)=>(e.openBlock(),e.createBlock(w,{id:"konnectio-availability-form",class:e.normalizeClass({reservation:i.booking}),type:"availability",onSubmit:A},{default:e.withCtx(({isLoading:C})=>[e.createBaseVNode("ul",{id:"konnectio-availability-form-content",class:e.normalizeClass([{"is-not-booking-page":!i.booking},{"only-adult-guests":!e.unref(s)&&e.unref(d)},{"only-child-guests":!e.unref(d)&&e.unref(s)},{"no-guests":e.unref(s)&&e.unref(d)},{"all-guests":!e.unref(s)&&!e.unref(d)},{"has-location":e.unref(f)}])},[e.unref(f)?(e.openBlock(),e.createElementBlock("li",R,[e.createVNode(e._sfc_main,{modelValue:e.unref(v),"onUpdate:modelValue":t[0]||(t[0]=a=>e.isRef(v)?v.value=a:null),label:e.unref(n)("general.location"),icon:"location-dot","icon-type":"fas","icon-placement":"label",options:e.unref(S),searchable:!1},null,8,["modelValue","label","options"])])):e.createCommentVNode("",!0),e.createBaseVNode("li",$,[e.createVNode(m._sfc_main,{modelValue:y.value,"onUpdate:modelValue":t[1]||(t[1]=a=>y.value=a),label:e.unref(n)("availability.checkInOut"),"icon-type":"fas","icon-placement":"label","min-range":1,range:""},null,8,["modelValue","label"]),e.createCommentVNode("",!0)]),!e.unref(s)||!e.unref(d)?(e.openBlock(),e.createElementBlock("li",L,[e.unref(s)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(f)?(e.openBlock(),e.createBlock(e.TextField,{key:0,modelValue:e.unref(o),"onUpdate:modelValue":t[4]||(t[4]=a=>e.isRef(o)?o.value=a:null),label:e.unref(n)("availability.adults"),"icon-type":"fas","icon-placement":"label",name:"adults",icon:"male"},null,8,["modelValue","label"])):(e.openBlock(),e.createBlock(h._sfc_main,{key:1,modelValue:e.unref(o),"onUpdate:modelValue":t[5]||(t[5]=a=>e.isRef(o)?o.value=a:null),label:e.unref(n)("availability.adults"),"icon-type":"fas","icon-placement":"label",name:"adults",icon:"male"},null,8,["modelValue","label"]))],64)),e.unref(d)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(f)?(e.openBlock(),e.createBlock(e.TextField,{key:0,modelValue:e.unref(u),"onUpdate:modelValue":t[6]||(t[6]=a=>e.isRef(u)?u.value=a:null),label:e.unref(n)("availability.children"),"icon-type":"fas","icon-placement":"label",name:"children",icon:"child"},null,8,["modelValue","label"])):(e.openBlock(),e.createBlock(h._sfc_main,{key:1,modelValue:e.unref(u),"onUpdate:modelValue":t[7]||(t[7]=a=>e.isRef(u)?u.value=a:null),label:e.unref(n)("availability.children"),"icon-type":"fas","icon-placement":"label",name:"children",icon:"child"},null,8,["modelValue","label"]))],64))])):e.createCommentVNode("",!0),e.createBaseVNode("li",U,[e.createVNode(e.Clickable,{type:"submit",label:e.unref(n)("availability.buttonLabel"),disabled:!V.value,"is-loading":e.unref(F)||C},null,8,["label","disabled","is-loading"])])],2)]),_:1},8,["class"]))}});const q=e._export_sfc(H,[["__scopeId","data-v-4e84897d"]]),T={class:"availability-skeleton"},I={key:0,class:"availability-skeleton-navigation"},z={key:1,class:"availability-skeleton-hotel"},O={key:2,class:"availability-skeleton-event"},M=e.defineComponent({__name:"AvailabilitySkeleton",props:{view:{default:"hotel"}},setup(p){return(n,l)=>(e.openBlock(),e.createElementBlock("div",T,[n.view==="both"?(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(x.Element,{height:"28px",width:"60px","border-radius":"20px"}),e.createVNode(x.Element,{height:"28px",width:"60px","border-radius":"20px"})])):e.createCommentVNode("",!0),n.view!=="event"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(_.Field,{"with-icon":""}),e.createVNode(_.Field,{"with-icon":""}),e.createVNode(_.Field,{"with-icon":""}),e.createVNode(_.Field,{"with-icon":"","no-label":""})])):(e.openBlock(),e.createElementBlock("div",O,[e.createVNode(_.Field,{"with-icon":""}),e.createVNode(_.Field,{"with-icon":"","no-label":""})]))]))}});const j=e._export_sfc(M,[["__scopeId","data-v-c266ccbc"]]);exports.AvailabilitySkeleton=j;exports.HotelAvailabilityForm=q;exports._sfc_main=w;