@konnectio/core 4.0.23 → 4.0.24
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.
- package/dist/{ActionField-8386d3a0.cjs → ActionField-8ee667bd.cjs} +1 -1
- package/dist/{ActionField-a1ee7410.js → ActionField-b2ee8f91.js} +2 -2
- package/dist/ActionField-b2ee8f91.js.br +0 -0
- package/dist/AvailabilitySkeleton-16a3be88.js +227 -0
- package/dist/AvailabilitySkeleton-16a3be88.js.br +0 -0
- package/dist/AvailabilitySkeleton-83a2e2c6.cjs +1 -0
- package/dist/{DateField.vue_vue_type_style_index_0_lang-f99a57e9.cjs → DateField.vue_vue_type_style_index_0_lang-4caf9daf.cjs} +2 -2
- package/dist/{DateField.vue_vue_type_style_index_0_lang-7eca1f41.js → DateField.vue_vue_type_style_index_0_lang-a4abbe86.js} +6 -6
- package/dist/DateField.vue_vue_type_style_index_0_lang-a4abbe86.js.br +0 -0
- package/dist/{Field-8a225f2e.cjs → Field-877b4588.cjs} +1 -1
- package/dist/{Field-01acaecd.js → Field-f5f98938.js} +2 -2
- package/dist/Field-f5f98938.js.br +0 -0
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-966e55eb.js → NumberField.vue_vue_type_script_setup_true_lang-5bf8b187.js} +2 -2
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-5bf8b187.js.br +0 -0
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-2520c9fa.cjs → NumberField.vue_vue_type_script_setup_true_lang-f72da2f4.cjs} +1 -1
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-8552e557.cjs → SelectField.vue_vue_type_style_index_0_lang-727c44d8.cjs} +22 -22
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-6fa298e4.js → SelectField.vue_vue_type_style_index_0_lang-f136675d.js} +739 -724
- package/dist/SelectField.vue_vue_type_style_index_0_lang-f136675d.js.br +0 -0
- package/dist/{ThankYou-384c77e1.js → ThankYou-58baa41d.js} +9 -9
- package/dist/ThankYou-58baa41d.js.br +0 -0
- package/dist/{ThankYou-c1397863.cjs → ThankYou-f027d958.cjs} +2 -2
- package/dist/{_-570b650d.cjs → _-573e46fc.cjs} +1 -1
- package/dist/{_-0e8ce73d.js → _-e0a2fd6e.js} +1 -1
- package/dist/_-e0a2fd6e.js.br +0 -0
- package/dist/availability.cjs +1 -1
- package/dist/availability.js +7 -7
- package/dist/availability.js.br +0 -0
- package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +1 -1
- package/dist/components/inputs/InputField.vue.d.ts +1 -1
- package/dist/components/listings/Base.vue.d.ts +1 -1
- package/dist/components/listings/Hotel.vue.d.ts +1 -1
- package/dist/{event-3a539ded.cjs → event-01f44344.cjs} +1 -1
- package/dist/{event-20213c2c.js → event-3e48b8ad.js} +9 -9
- package/dist/event-3e48b8ad.js.br +0 -0
- package/dist/event.cjs +1 -1
- package/dist/event.js +8 -8
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.cjs +1 -1
- package/dist/gift-card-validation.js +3 -3
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.cjs +1 -1
- package/dist/gift-card.js +5 -5
- package/dist/gift-card.js.br +0 -0
- package/dist/hotel.cjs +5 -5
- package/dist/hotel.js +770 -760
- package/dist/hotel.js.br +0 -0
- package/dist/{index-4b1265f3.cjs → index-68332b8a.cjs} +1 -1
- package/dist/{index-f9af089a.js → index-931022d3.js} +1 -1
- package/dist/index-931022d3.js.br +0 -0
- package/dist/polyfill.cjs +1 -1
- package/dist/polyfill.js +1 -1
- package/dist/polyfill.js.br +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/package.json +1 -1
- package/dist/ActionField-a1ee7410.js.br +0 -0
- package/dist/AvailabilitySkeleton-6c6bec89.js +0 -223
- package/dist/AvailabilitySkeleton-6c6bec89.js.br +0 -0
- package/dist/AvailabilitySkeleton-b36452fe.cjs +0 -1
- package/dist/DateField.vue_vue_type_style_index_0_lang-7eca1f41.js.br +0 -0
- package/dist/Field-01acaecd.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-966e55eb.js.br +0 -0
- package/dist/SelectField.vue_vue_type_style_index_0_lang-6fa298e4.js.br +0 -0
- package/dist/ThankYou-384c77e1.js.br +0 -0
- package/dist/_-0e8ce73d.js.br +0 -0
- package/dist/event-20213c2c.js.br +0 -0
- package/dist/index-f9af089a.js.br +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./SelectField.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const l=require("./SelectField.vue_vue_type_style_index_0_lang-727c44d8.cjs"),m=require("./NumberField.vue_vue_type_script_setup_true_lang-f72da2f4.cjs"),y={class:"fresh-booking-action-field"},f=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 c(){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(m._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=>c())},null,8,["data-test","icon","label","icon-color","styling","is-loading","disabled","secondary"])])]),_:1},8,["label","id","icon","icon-type","required","type","readonly"]))}});const b=l._export_sfc(f,[["__scopeId","data-v-ad281c18"]]);exports.ActionField=b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as b, 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-
|
|
2
|
-
import { _ as A } from "./NumberField.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { h as b, 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-f136675d.js";
|
|
2
|
+
import { _ as A } from "./NumberField.vue_vue_type_script_setup_true_lang-5bf8b187.js";
|
|
3
3
|
const h = { class: "fresh-booking-action-field" }, L = /* @__PURE__ */ b({
|
|
4
4
|
__name: "ActionField",
|
|
5
5
|
props: {
|
|
Binary file
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { h as $, r as O, a as T, k as t, q as c, aa as Q, H as W, z as X, s as x, ab as B, c as b, a1 as C, o as Y, l as D, w as Z, x as A, n as e, m as s, B as g, y as ee, t as _, a2 as F, T as H, C as ae, v as E, f as le, _ as q } from "./SelectField.vue_vue_type_style_index_0_lang-f136675d.js";
|
|
2
|
+
import { u as N, _ as te } from "./DateField.vue_vue_type_style_index_0_lang-a4abbe86.js";
|
|
3
|
+
import { _ as I } from "./NumberField.vue_vue_type_script_setup_true_lang-5bf8b187.js";
|
|
4
|
+
import { E as z } from "./_-e0a2fd6e.js";
|
|
5
|
+
import { F as f } from "./Field-f5f98938.js";
|
|
6
|
+
const ie = ["onSubmit"], ne = /* @__PURE__ */ $({
|
|
7
|
+
__name: "_",
|
|
8
|
+
props: {
|
|
9
|
+
type: { default: "submit" }
|
|
10
|
+
},
|
|
11
|
+
emits: ["submit"],
|
|
12
|
+
setup(k, { emit: a }) {
|
|
13
|
+
const n = O(!1), r = a, u = k, { verifyRecaptcha: d } = T();
|
|
14
|
+
function p() {
|
|
15
|
+
n.value = !0, d({
|
|
16
|
+
callback: y,
|
|
17
|
+
type: u.type
|
|
18
|
+
}).then(() => n.value = !1);
|
|
19
|
+
}
|
|
20
|
+
function y() {
|
|
21
|
+
r("submit");
|
|
22
|
+
}
|
|
23
|
+
return (V, S) => (t(), c("form", {
|
|
24
|
+
onSubmit: W(p, ["prevent"])
|
|
25
|
+
}, [
|
|
26
|
+
Q(V.$slots, "default", { isLoading: n.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
|
+
}, ce = { id: "fresh-booking-availability-confirmation" }, ue = /* @__PURE__ */ $({
|
|
36
|
+
__name: "HotelAvailabilityForm",
|
|
37
|
+
props: {
|
|
38
|
+
booking: { type: Boolean, default: !1 },
|
|
39
|
+
link: {}
|
|
40
|
+
},
|
|
41
|
+
setup(k) {
|
|
42
|
+
const { t: a } = X(), n = k, {
|
|
43
|
+
adults: r,
|
|
44
|
+
children: u,
|
|
45
|
+
arrivalDate: d,
|
|
46
|
+
departureDate: p,
|
|
47
|
+
location: y,
|
|
48
|
+
isExpired: V
|
|
49
|
+
} = x(B()), { reset: S } = B(), { fetchAvailabilityData: M } = N(), { areListingsLoading: j, hotelList: G, hasHotelList: h } = x(N()), {
|
|
50
|
+
firstSelectableDateOffset: L,
|
|
51
|
+
lastSelectableDateOffset: R,
|
|
52
|
+
disableChildSelection: v,
|
|
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() + R.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() + (R.value + 1)))), U = b(() => !(!m && r.value === 0)), J = b(() => typeof n.link != "string");
|
|
55
|
+
function K() {
|
|
56
|
+
if (n.booking === !1)
|
|
57
|
+
if (J.value) {
|
|
58
|
+
const o = le();
|
|
59
|
+
n.link[o] ? window.location.replace(n.link[o]) : n.link.en ? window.location.replace(n.link.en) : console.log("Sprog understøttes ikke");
|
|
60
|
+
} else
|
|
61
|
+
window.location.replace(n.link);
|
|
62
|
+
else
|
|
63
|
+
U.value && M();
|
|
64
|
+
}
|
|
65
|
+
return C(d, (o) => {
|
|
66
|
+
const l = new Date(new Date(o).setDate(new Date(o).getDate() + 1));
|
|
67
|
+
new Date(p.value) < l && (p.value = l);
|
|
68
|
+
}), C(w, (o) => {
|
|
69
|
+
d.value = o[0], p.value = o[1];
|
|
70
|
+
}), Y(() => {
|
|
71
|
+
V.value && S(), w.value = [d.value, p.value];
|
|
72
|
+
}), (o, l) => (t(), D(ne, {
|
|
73
|
+
id: "konnectio-availability-form",
|
|
74
|
+
class: E({ reservation: o.booking }),
|
|
75
|
+
type: "availability",
|
|
76
|
+
onSubmit: K
|
|
77
|
+
}, {
|
|
78
|
+
default: Z(({ isLoading: P }) => [
|
|
79
|
+
A("ul", {
|
|
80
|
+
id: "konnectio-availability-form-content",
|
|
81
|
+
class: E([
|
|
82
|
+
{ "is-not-booking-page": !o.booking },
|
|
83
|
+
{ "only-adult-guests": !e(m) && e(v) },
|
|
84
|
+
{ "only-child-guests": !e(v) && e(m) },
|
|
85
|
+
{ "no-guests": e(m) && e(v) },
|
|
86
|
+
{ "all-guests": !e(m) && !e(v) },
|
|
87
|
+
{ "has-location": e(h) }
|
|
88
|
+
])
|
|
89
|
+
}, [
|
|
90
|
+
e(h) ? (t(), c("li", oe, [
|
|
91
|
+
s(ee, {
|
|
92
|
+
modelValue: e(y),
|
|
93
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => g(y) ? y.value = i : null),
|
|
94
|
+
label: e(a)("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
|
+
A("li", se, [
|
|
103
|
+
s(te, {
|
|
104
|
+
modelValue: w.value,
|
|
105
|
+
"onUpdate:modelValue": l[1] || (l[1] = (i) => w.value = i),
|
|
106
|
+
label: e(a)("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(v) ? (t(), c("li", re, [
|
|
115
|
+
e(m) ? _("", !0) : (t(), c(F, { key: 0 }, [
|
|
116
|
+
e(h) ? (t(), D(H, {
|
|
117
|
+
key: 0,
|
|
118
|
+
modelValue: e(r),
|
|
119
|
+
"onUpdate:modelValue": l[4] || (l[4] = (i) => g(r) ? r.value = i : null),
|
|
120
|
+
label: e(a)("availability.adults"),
|
|
121
|
+
description: e(a)("general.adultAgeRange"),
|
|
122
|
+
"icon-type": "fas",
|
|
123
|
+
"icon-placement": "label",
|
|
124
|
+
name: "adults",
|
|
125
|
+
icon: "male"
|
|
126
|
+
}, null, 8, ["modelValue", "label", "description"])) : (t(), D(I, {
|
|
127
|
+
key: 1,
|
|
128
|
+
modelValue: e(r),
|
|
129
|
+
"onUpdate:modelValue": l[5] || (l[5] = (i) => g(r) ? r.value = i : null),
|
|
130
|
+
label: e(a)("availability.adults"),
|
|
131
|
+
description: e(a)("general.adultAgeRange"),
|
|
132
|
+
"icon-type": "fas",
|
|
133
|
+
"icon-placement": "label",
|
|
134
|
+
name: "adults",
|
|
135
|
+
icon: "male"
|
|
136
|
+
}, null, 8, ["modelValue", "label", "description"]))
|
|
137
|
+
], 64)),
|
|
138
|
+
e(v) ? _("", !0) : (t(), c(F, { key: 1 }, [
|
|
139
|
+
e(h) ? (t(), D(H, {
|
|
140
|
+
key: 0,
|
|
141
|
+
modelValue: e(u),
|
|
142
|
+
"onUpdate:modelValue": l[6] || (l[6] = (i) => g(u) ? u.value = i : null),
|
|
143
|
+
label: e(a)("availability.children"),
|
|
144
|
+
description: e(a)("general.childAgeRange"),
|
|
145
|
+
"icon-type": "fas",
|
|
146
|
+
"icon-placement": "label",
|
|
147
|
+
name: "children",
|
|
148
|
+
icon: "child"
|
|
149
|
+
}, null, 8, ["modelValue", "label", "description"])) : (t(), D(I, {
|
|
150
|
+
key: 1,
|
|
151
|
+
modelValue: e(u),
|
|
152
|
+
"onUpdate:modelValue": l[7] || (l[7] = (i) => g(u) ? u.value = i : null),
|
|
153
|
+
label: e(a)("availability.children"),
|
|
154
|
+
description: e(a)("general.childAgeRange"),
|
|
155
|
+
"icon-type": "fas",
|
|
156
|
+
"icon-placement": "label",
|
|
157
|
+
name: "children",
|
|
158
|
+
icon: "child"
|
|
159
|
+
}, null, 8, ["modelValue", "label", "description"]))
|
|
160
|
+
], 64))
|
|
161
|
+
])) : _("", !0),
|
|
162
|
+
A("li", ce, [
|
|
163
|
+
s(ae, {
|
|
164
|
+
type: "submit",
|
|
165
|
+
label: e(a)("availability.buttonLabel"),
|
|
166
|
+
disabled: !U.value,
|
|
167
|
+
"is-loading": e(j) || P
|
|
168
|
+
}, null, 8, ["label", "disabled", "is-loading"])
|
|
169
|
+
])
|
|
170
|
+
], 2)
|
|
171
|
+
]),
|
|
172
|
+
_: 1
|
|
173
|
+
}, 8, ["class"]));
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
const xe = /* @__PURE__ */ q(ue, [["__scopeId", "data-v-cb0dfdfc"]]), de = { class: "availability-skeleton" }, me = {
|
|
177
|
+
key: 0,
|
|
178
|
+
class: "availability-skeleton-navigation"
|
|
179
|
+
}, pe = {
|
|
180
|
+
key: 1,
|
|
181
|
+
class: "availability-skeleton-hotel"
|
|
182
|
+
}, ve = {
|
|
183
|
+
key: 2,
|
|
184
|
+
class: "availability-skeleton-event"
|
|
185
|
+
}, be = /* @__PURE__ */ $({
|
|
186
|
+
__name: "AvailabilitySkeleton",
|
|
187
|
+
props: {
|
|
188
|
+
view: { default: "hotel" }
|
|
189
|
+
},
|
|
190
|
+
setup(k) {
|
|
191
|
+
return (a, n) => (t(), c("div", de, [
|
|
192
|
+
a.view === "both" ? (t(), c("div", me, [
|
|
193
|
+
s(z, {
|
|
194
|
+
height: "28px",
|
|
195
|
+
width: "60px",
|
|
196
|
+
"border-radius": "20px"
|
|
197
|
+
}),
|
|
198
|
+
s(z, {
|
|
199
|
+
height: "28px",
|
|
200
|
+
width: "60px",
|
|
201
|
+
"border-radius": "20px"
|
|
202
|
+
})
|
|
203
|
+
])) : _("", !0),
|
|
204
|
+
a.view !== "event" ? (t(), c("div", pe, [
|
|
205
|
+
s(f, { "with-icon": "" }),
|
|
206
|
+
s(f, { "with-icon": "" }),
|
|
207
|
+
s(f, { "with-icon": "" }),
|
|
208
|
+
s(f, {
|
|
209
|
+
"with-icon": "",
|
|
210
|
+
"no-label": ""
|
|
211
|
+
})
|
|
212
|
+
])) : (t(), c("div", ve, [
|
|
213
|
+
s(f, { "with-icon": "" }),
|
|
214
|
+
s(f, {
|
|
215
|
+
"with-icon": "",
|
|
216
|
+
"no-label": ""
|
|
217
|
+
})
|
|
218
|
+
]))
|
|
219
|
+
]));
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
const Ae = /* @__PURE__ */ q(be, [["__scopeId", "data-v-c266ccbc"]]);
|
|
223
|
+
export {
|
|
224
|
+
Ae as A,
|
|
225
|
+
xe as H,
|
|
226
|
+
ne as _
|
|
227
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-727c44d8.cjs"),b=require("./DateField.vue_vue_type_style_index_0_lang-4caf9daf.cjs"),V=require("./NumberField.vue_vue_type_script_setup_true_lang-f72da2f4.cjs"),x=require("./_-573e46fc.cjs"),_=require("./Field-877b4588.cjs"),C=["onSubmit"],w=e.defineComponent({__name:"_",props:{type:{default:"submit"}},emits:["submit"],setup(v,{emit:t}){const n=e.ref(!1),o=t,c=v,{verifyRecaptcha:r}=e.useUtilityStore();function s(){n.value=!0,r({callback:p,type:c.type}).then(()=>n.value=!1)}function p(){o("submit")}return(y,k)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(s,["prevent"])},[e.renderSlot(y.$slots,"default",{isLoading:n.value})],40,C))}}),E={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(v){const{t}=e.useI18n(),n=v,{adults:o,children:c,arrivalDate:r,departureDate:s,location:p,isExpired:y}=e.storeToRefs(e.useAvailabilityStore()),{reset:k}=e.useAvailabilityStore(),{fetchAvailabilityData:B}=b.useHotelStore(),{areListingsLoading:F,hotelList:S,hasHotelList:m}=e.storeToRefs(b.useHotelStore()),{firstSelectableDateOffset:g,lastSelectableDateOffset:D,disableChildSelection:d,disableAdultSelection:u}=e.storeToRefs(e.useUtilityStore()),f=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(r.value.getDate()+g.value))),P=e.computed(()=>new Date(new Date().setDate(r.value.getDate()+(D.value+1)))),h=e.computed(()=>!(!u&&o.value===0)),N=e.computed(()=>typeof n.link!="string");function A(){if(n.booking===!1)if(N.value){const i=e.getUserLanguage();n.link[i]?window.location.replace(n.link[i]):n.link.en?window.location.replace(n.link.en):console.log("Sprog understøttes ikke")}else window.location.replace(n.link);else h.value&&B()}return e.watch(r,i=>{const l=new Date(new Date(i).setDate(new Date(i).getDate()+1));new Date(s.value)<l&&(s.value=l)}),e.watch(f,i=>{r.value=i[0],s.value=i[1]}),e.onMounted(()=>{y.value&&k(),f.value=[r.value,s.value]}),(i,l)=>(e.openBlock(),e.createBlock(w,{id:"konnectio-availability-form",class:e.normalizeClass({reservation:i.booking}),type:"availability",onSubmit:A},{default:e.withCtx(({isLoading:R})=>[e.createBaseVNode("ul",{id:"konnectio-availability-form-content",class:e.normalizeClass([{"is-not-booking-page":!i.booking},{"only-adult-guests":!e.unref(u)&&e.unref(d)},{"only-child-guests":!e.unref(d)&&e.unref(u)},{"no-guests":e.unref(u)&&e.unref(d)},{"all-guests":!e.unref(u)&&!e.unref(d)},{"has-location":e.unref(m)}])},[e.unref(m)?(e.openBlock(),e.createElementBlock("li",E,[e.createVNode(e._sfc_main,{modelValue:e.unref(p),"onUpdate:modelValue":l[0]||(l[0]=a=>e.isRef(p)?p.value=a:null),label:e.unref(t)("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(b._sfc_main,{modelValue:f.value,"onUpdate:modelValue":l[1]||(l[1]=a=>f.value=a),label:e.unref(t)("availability.checkInOut"),"icon-type":"fas","icon-placement":"label","min-range":1,range:""},null,8,["modelValue","label"]),e.createCommentVNode("",!0)]),!e.unref(u)||!e.unref(d)?(e.openBlock(),e.createElementBlock("li",L,[e.unref(u)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(m)?(e.openBlock(),e.createBlock(e.TextField,{key:0,modelValue:e.unref(o),"onUpdate:modelValue":l[4]||(l[4]=a=>e.isRef(o)?o.value=a:null),label:e.unref(t)("availability.adults"),description:e.unref(t)("general.adultAgeRange"),"icon-type":"fas","icon-placement":"label",name:"adults",icon:"male"},null,8,["modelValue","label","description"])):(e.openBlock(),e.createBlock(V._sfc_main,{key:1,modelValue:e.unref(o),"onUpdate:modelValue":l[5]||(l[5]=a=>e.isRef(o)?o.value=a:null),label:e.unref(t)("availability.adults"),description:e.unref(t)("general.adultAgeRange"),"icon-type":"fas","icon-placement":"label",name:"adults",icon:"male"},null,8,["modelValue","label","description"]))],64)),e.unref(d)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(m)?(e.openBlock(),e.createBlock(e.TextField,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":l[6]||(l[6]=a=>e.isRef(c)?c.value=a:null),label:e.unref(t)("availability.children"),description:e.unref(t)("general.childAgeRange"),"icon-type":"fas","icon-placement":"label",name:"children",icon:"child"},null,8,["modelValue","label","description"])):(e.openBlock(),e.createBlock(V._sfc_main,{key:1,modelValue:e.unref(c),"onUpdate:modelValue":l[7]||(l[7]=a=>e.isRef(c)?c.value=a:null),label:e.unref(t)("availability.children"),description:e.unref(t)("general.childAgeRange"),"icon-type":"fas","icon-placement":"label",name:"children",icon:"child"},null,8,["modelValue","label","description"]))],64))])):e.createCommentVNode("",!0),e.createBaseVNode("li",U,[e.createVNode(e.Clickable,{type:"submit",label:e.unref(t)("availability.buttonLabel"),disabled:!h.value,"is-loading":e.unref(F)||R},null,8,["label","disabled","is-loading"])])],2)]),_:1},8,["class"]))}});const q=e._export_sfc(H,[["__scopeId","data-v-cb0dfdfc"]]),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(v){return(t,n)=>(e.openBlock(),e.createElementBlock("div",T,[t.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),t.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;
|