HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/farmfun/reserveren.farmfun.be/wwwroot/js/site/app/booking.js
/*! For license information please see booking.js.LICENSE.txt */
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[240],{666:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function o(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}n.d(t,{A:()=>s,U:()=>u});var s=function(){return e=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"type",u.info),o(this,"title",""),o(this,"lines",[]),o(this,"hasIcon",!1),this.lines=t,this.title=n},(t=[{key:"setType",value:function(e){return this.type=e,this}},{key:"enableIcon",value:function(){return this.hasIcon=!0,this}}])&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}(),u={info:"action",warning:"warning",error:"error",success:"success"}},2422:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(6934),a=n(666),o=n(8192),i=(0,r.KR)(null),s=40;function u(){var e=(0,o.A)().trans,t=(0,r.KR)([]),n=(0,r.KR)(!1),u=function(){t.value=[],n.value=!1},c=function(r){var o=0;switch(r.response&&r.response.status&&(o=r.response.status),o){case 417:t.value.push(new a.A([r.response.data.message],"Error").setType(a.U.warning));break;case 412:t.value.push(new a.A([r.response.data.message],"Bevestig wijziging").setType(a.U.info)),n.value=!0;break;default:console.warn(r);var i=new a.A([e("oops_something_went_wrong")],"Error").setType(a.U.error);t.value.push(i)}};return{cart:i,maxAmount:s,updateProduct:function(e,t){return u(),window.axios.post("/api/cart/item/".concat(e),t).catch((function(e){c(e)}))},removeProduct:function(e){return u(),window.axios.delete("/api/cart/item/".concat(e)).catch((function(e){c(e)}))},loadCart:function(){return u(),window.axios.get("/api/cart/index").then((function(e){i.value=e.data})).catch((function(e){c(e)}))},updateMeta:function(e){return u(),window.axios.post("/api/cart/update-meta",e).then((function(e){})).catch((function(e){c(e)}))},cartErrors:t,showForceCartUpdate:n}}},6262:(e,t)=>{t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}},8366:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(6934),a=["data-type"],o={key:0,class:"flash-message__icon"},i={class:"flash-message__icon-img"},s=["href"],u={class:"flash-message__text"},c=["innerHTML"],l={key:0},p={key:1,class:"flash-message__close"},f=[(0,r.Lk)("use",{href:"/img/icon-close.svg#close"},null,-1)];const v={name:"FlashMessage",props:{messageType:{type:String,default:"action"},lines:{type:Array,required:!0},withoutIcon:{type:Boolean,default:!1},withClose:{type:Boolean,default:!1},iconName:{type:String}},setup:function(e){return{icon:(0,r.EW)((function(){if(void 0!==e.iconName)return"/img/icon-"+e.iconName+".svg#"+e.iconName;switch(e.messageType){case"warning":return"/img/icon-warning.svg#warning";case"error":return"/img/icon-cross--circle.svg#cross--circle";case"success":return"/img/icon-check--circle.svg#check--circle";default:return"/img/icon-info.svg#info"}}))}}};const d=(0,n(6262).A)(v,[["render",function(e,t,n,v,d,m){return(0,r.uX)(),(0,r.CE)("div",{class:"flash-message","data-type":n.messageType},[n.withoutIcon?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("span",o,[((0,r.uX)(),(0,r.CE)("svg",i,[(0,r.Lk)("use",{href:v.icon},null,8,s)]))])),(0,r.Lk)("span",u,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(n.lines,(function(e,t){return(0,r.uX)(),(0,r.CE)(r.FK,null,[(0,r.Lk)("span",{innerHTML:e},null,8,c),t<=n.lines.length?((0,r.uX)(),(0,r.CE)("br",l)):(0,r.Q3)("",!0)],64)})),256))]),n.withClose?((0,r.uX)(),(0,r.CE)("svg",p,f)):(0,r.Q3)("",!0)],8,a)}]])},1262:(e,t,n)=>{n.r(t),n.d(t,{default:()=>B});var r=n(6934),a={key:0,class:"o-modal"},o={key:0,class:"o-modal__content"},i={class:"o-modal__header"},s={class:"o-modal__title"},u={key:0,class:"o-model__selected"},c=(0,r.Lk)("div",{class:"c-form-element__label"},"Gekozen vestiging",-1),l={class:"o-modal__current"},p=(0,r.Lk)("br",null,null,-1),f=(0,r.Lk)("br",null,null,-1),v=["href"],d=[(0,r.Lk)("svg",{width:"12",height:"12"},[(0,r.Lk)("use",{href:"/img/icon-edit.svg#edit"})],-1)],m={class:"o-modal__details"},h={key:0,class:"c-form-element__label"},y=(0,r.Lk)("img",{class:"c-input__icon",src:"/img/calendar.svg"},null,-1),g=["placeholder"],_={key:1,class:"c-form-element__label u-spacing-mt2"},b=(0,r.Lk)("img",{class:"c-input__icon",src:"/img/location.svg"},null,-1),w={value:"",disabled:"disabled"},k=["value","disabled"],L={class:"c-form-element__label u-spacing-mt2"},x=(0,r.Lk)("img",{class:"c-input__icon",width:"23",height:"23",src:"/img/icon-clock.svg"},null,-1),E={value:"",disabled:"disabled"},C=["value","disabled"],S={class:"c-form-element__label u-spacing-mt2"},A=(0,r.Lk)("img",{class:"c-input__icon",src:"/img/people.svg"},null,-1),T=["max"],X=(0,r.Lk)("div",{class:"c-form-element__label",style:{"font-size":"12px"}},"Het aantal personen kan gewijzigd worden tot 72 uur voor de activiteit",-1),K={key:1,class:"o-modal__confirm"},P=["innerHTML"],j={key:2,class:"u-spacing-mt2 u-spacing-mlr2"},F={class:"c-button__text"},O={class:"o-modal__cancel"},U={class:"c-text-button__text"};var I=n(8192),N=n(8366),R=n(666),Q=n(7196),W=n(2422);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function M(){M=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),s=new X(r||[]);return a(i,"_invoke",{value:C(e,n,s)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",v="suspendedYield",d="executing",m="completed",h={};function y(){}function g(){}function _(){}var b={};c(b,i,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(K([])));k&&k!==n&&r.call(k,i)&&(b=k);var L=_.prototype=y.prototype=Object.create(b);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(a,o,i,s){var u=p(e[a],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==G(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(l).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function C(t,n,r){var a=f;return function(o,i){if(a===d)throw Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var s=r.delegate;if(s){var u=S(s,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=d;var c=p(t,n,r);if("normal"===c.type){if(a=r.done?m:v,c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(a=m,r.method="throw",r.arg=c.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=p(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function X(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function K(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(G(t)+" is not iterable")}return g.prototype=_,a(L,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:g,configurable:!0}),g.displayName=c(_,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,c(e,u,"GeneratorFunction")),e.prototype=Object.create(L),e},t.awrap=function(e){return{__await:e}},x(E.prototype),c(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new E(l(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(L),c(L,u,"Generator"),c(L,i,(function(){return this})),c(L,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=K,X.prototype={constructor:X,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return s.type="throw",s.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;T(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:K(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}function q(e,t,n,r,a,o,i){try{var s=e[o](i),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,a)}function z(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){q(o,r,a,i,s,"next",e)}function s(e){q(o,r,a,i,s,"throw",e)}i(void 0)}))}}const D={name:"PlanModal",components:{FlashMessage:N.A},emits:["close","success-close"],props:{cartRoute:{type:String,required:!0},productId:{required:!0},offerLink:{type:String,required:!0},sessionDate:{type:String},sessionLocation:{type:String},onSuccessClose:{type:Boolean}},setup:function(e,t){var n=t.emit,a=(0,I.A)().trans,o=(0,r.QW)(e).productId,i=(0,W.A)().maxAmount,s=(0,r.KR)([]),u=(0,r.KR)(null),c=(0,r.KR)([]),l=(0,r.KR)(!1),p=(0,r.KR)(""),f=(0,r.KR)(null),v=(0,r.KR)(null),d=(0,r.KR)(!1),m=(0,r.KR)("");e.sessionDate&&(f.value=e.sessionDate,l.value=!0),e.sessionLocation&&(p.value=parseInt(e.sessionLocation),l.value=!0);var h=(0,r.KR)(!0),y=(0,r.KR)(null),g=(0,r.EW)((function(){return!!u.value&&(null!==f.value&&(""!==p.value&&(!(!isset(_.value)||!_.value.available)&&((!u.value.has_timeslot_selection||""!==m.value)&&(null!==v.value&&!(0!==u.value.required_age&&!d.value))))))})),_=(0,r.EW)((function(){return""===p.value?null:c.value.find((function(e){return e.id==p.value}))})),b=(0,r.EW)((function(){return!(!_.value||!u.value)&&(!!_.value.available&&(!u.value.has_timeslot_selection||""!==m.value))})),w=function(){var e={minDate:(new Date).fp_incr(10)};f&&(e.defaultDate=f),(0,Q.A)(y.value,e),setTimeout((function(){h.value=!1}),100)},k=function(){s.value=[],window.axios.get("/api/availability/".concat(o.value,"/check"),{params:{date:f.value}}).then(function(){var e=z(M().mark((function e(t){var n;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.status,e.next=200===e.t0?3:204===e.t0?6:10;break;case 3:return c.value=t.data.data,console.log(t.data.data),e.abrupt("break",12);case 6:return n=new R.A([a("product_no_locations")]).setType(R.U.warning),s.value.push(n),c.value=[],e.abrupt("break",12);case 10:c.value=[],s.value.push(new R.A([a("unknown_response")]).setType(R.U.warning));case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){L(e)}))},L=function(e){console.error(e);var t=new R.A([a("oops_something_went_wrong")],"Error").setType(R.U.error);s.value.push(t)},x=function(){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s.value=[],v.value=null,m.value="",n(e?"success-close":"close")};return(0,r.wB)(o,function(){var t=z(M().mark((function t(n){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=3;break}return u.value=null,t.abrupt("return");case 3:return t.next=5,e.sessionLocation&&e.sessionLocation!=p.value&&(p.value=parseInt(e.sessionLocation)),s.value=[],void window.axios.get("/api/availability/".concat(o.value,"/info")).then(function(){var e=z(M().mark((function e(t){return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u.value=t.data.data,e.next=3,(0,r.dY)();case 3:w();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){L(e)}));case 5:l.value&&f.value&&k();case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,r.wB)(f,(function(e){if(!e)return c.value=[],void(p.value="");f.value&&k()})),{hasAnimationClasses:h,product:u,trans:a,messages:s,date:f,location:p,amountOfPersons:v,maxAmount:i,confirmed:d,canSubmit:g,submitForm:function(){if(s.value=[],""===v.value||Number.isNaN(v.value))s.value.push(new R.A([a("no_valid_number")]).setType(R.U.warning));else{var t=parseInt(v.value);if(t<u.value.minimum_amount_of_persons)s.value.push(new R.A([a("lower_then_minimum",{amount:u.value.minimum_amount_of_persons})]).setType(R.U.warning));else if(0!==u.value.maximum_amount_of_persons&&t>u.value.maximum_amount_of_persons)s.value.push(new R.A([a("higher_then_prod_maximum",{amount:u.value.maximum_amount_of_persons})]).setType(R.U.warning));else if(t>i)s.value.push(new R.A([a("higher_then_maximum",{link:e.offerLink})]).setType(R.U.warning));else{var n=new FormData;n.append("product_id",o.value),n.append("location_id",p.value),n.append("date",f.value),n.append("timeSlot",m.value),n.append("amount_of_persons",v.value),window.axios.post("/api/cart/fill-cart",n).then(function(){var t=z(M().mark((function t(n){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=n.status,t.next=206===t.t0?3:204===t.t0?13:15;break;case 3:if(!n.data.messages){t.next=7;break}s.value.push(new R.A(n.data.messages).setType(R.U.warning)),t.next=12;break;case 7:if(!n.data.message){t.next=11;break}s.value.push(new R.A([n.data.message]).setType(R.U.warning)),t.next=12;break;case 11:throw new Error("provide message or messages as key");case 12:return t.abrupt("break",16);case 13:return e.onSuccessClose?x(null,!0):window.location.href=e.cartRoute,t.abrupt("break",16);case 15:s.value.push(new R.A([a("unknown_response")]).setType(R.U.warning));case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){L(e)}))}}},close:x,datepicker:y,availableLocations:c,selectedLocation:_,timeSlot:m,hasSession:l,canSelectPersons:b}}};const B=(0,n(6262).A)(D,[["render",function(e,t,n,I,N,R){var Q=(0,r.g2)("flash-message");return null!==n.productId?((0,r.uX)(),(0,r.CE)("div",a,[(0,r.Lk)("div",{class:"o-modal__shader",onClick:t[0]||(t[0]=function(){return I.close&&I.close.apply(I,arguments)})}),(0,r.Lk)("section",{class:(0,r.C4)(["o-modal__main",{"is-modal-visible":!I.hasAnimationClasses}])},[I.product?((0,r.uX)(),(0,r.CE)("div",o,[(0,r.Lk)("div",i,[(0,r.Lk)("button",{type:"button",class:"o-modal__close",onClick:t[1]||(t[1]=function(){return I.close&&I.close.apply(I,arguments)})}),(0,r.Lk)("div",s,(0,r.v_)(I.product.name),1)]),I.hasSession?((0,r.uX)(),(0,r.CE)("div",u,[I.selectedLocation?((0,r.uX)(),(0,r.CE)(r.FK,{key:0},[c,(0,r.Lk)("div",l,[(0,r.eW)((0,r.v_)(I.selectedLocation.name),1),p,(0,r.eW)(" "+(0,r.v_)(I.date),1)])],64)):((0,r.uX)(),(0,r.CE)(r.FK,{key:1},[(0,r.eW)(" Niet mogelijk op gekozen vestiging."),f,(0,r.eW)(" Wijzig vestiging in de winkelwagen. ")],64)),(0,r.Lk)("a",{class:"o-modal__edit",href:n.cartRoute},d,8,v)])):(0,r.Q3)("",!0),(0,r.Lk)("div",m,[I.hasSession?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("label",h,(0,r.v_)(I.trans("date")),1)),(0,r.Lk)("div",{class:(0,r.C4)(["c-input-wrapper",{"is-locked":I.hasSession}])},[y,(0,r.bo)((0,r.Lk)("input",{class:"c-search__input c-input",ref:"datepicker",name:"date",placeholder:I.trans("choose_a_date"),type:"date","onUpdate:modelValue":t[2]||(t[2]=function(e){return I.date=e})},null,8,g),[[r.Jo,I.date]])],2),I.hasSession?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("label",_,(0,r.v_)(I.trans("location")),1)),(0,r.Lk)("div",{class:(0,r.C4)(["c-input-wrapper",{"is-disabled":0===I.availableLocations.length,"is-locked":I.hasSession}])},[b,(0,r.bo)((0,r.Lk)("select",{class:"c-select","onUpdate:modelValue":t[3]||(t[3]=function(e){return I.location=e})},[(0,r.Lk)("option",w,(0,r.v_)(I.trans("select_location")),1),((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(I.availableLocations,(function(e){return(0,r.uX)(),(0,r.CE)("option",{value:e.id,disabled:!e.available},[(0,r.eW)((0,r.v_)(e.name)+" ",1),""!==e.reason?((0,r.uX)(),(0,r.CE)(r.FK,{key:0},[(0,r.eW)("( "+(0,r.v_)(I.trans("reason."+e.reason))+" )",1)],64)):(0,r.Q3)("",!0)],8,k)})),256))],512),[[r.u1,I.location]])],2),I.product&&I.product.has_timeslot_selection?((0,r.uX)(),(0,r.CE)(r.FK,{key:2},[(0,r.Lk)("label",L,(0,r.v_)(I.trans("time")),1),(0,r.Lk)("div",{class:(0,r.C4)(["c-input-wrapper",{"is-disabled":!I.selectedLocation||!I.selectedLocation.available}])},[x,(0,r.bo)((0,r.Lk)("select",{class:"c-select","onUpdate:modelValue":t[4]||(t[4]=function(e){return I.timeSlot=e})},[(0,r.Lk)("option",E,(0,r.v_)(I.trans("select_time")),1),I.selectedLocation?((0,r.uX)(!0),(0,r.CE)(r.FK,{key:0},(0,r.pI)(I.selectedLocation.timeSlots,(function(e){return(0,r.uX)(),(0,r.CE)("option",{value:e.slot,disabled:!e.available},[(0,r.eW)((0,r.v_)(e.label)+" ",1),e.available?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)(r.FK,{key:0},[(0,r.eW)("( "+(0,r.v_)(I.trans("reason.full"))+" )",1)],64))],8,C)})),256)):(0,r.Q3)("",!0)],512),[[r.u1,I.timeSlot]])],2)],64)):(0,r.Q3)("",!0),(0,r.Lk)("label",S,(0,r.v_)(I.trans("amount_of_persons")),1),(0,r.Lk)("div",{class:(0,r.C4)(["c-input-wrapper",{"is-disabled":!I.canSelectPersons}])},[A,(0,r.bo)((0,r.Lk)("input",{class:"c-input",type:"number",name:"amount_of_persons",pattern:"[0-9]+",min:"0",max:0===I.product.maximum_amount_of_persons?null:I.product.maximum_amount_of_persons,"onUpdate:modelValue":t[5]||(t[5]=function(e){return I.amountOfPersons=e})},null,8,T),[[r.Jo,I.amountOfPersons]]),X],2)]),0!==I.product.required_age?((0,r.uX)(),(0,r.CE)("div",K,[(0,r.Lk)("label",{class:(0,r.C4)(["c-checkbox",{"is-disabled":null===I.amountOfPersons||!I.selectedLocation.available}])},[(0,r.bo)((0,r.Lk)("input",{class:"c-checkbox__input",type:"checkbox",name:"modal-confirm-age","onUpdate:modelValue":t[6]||(t[6]=function(e){return I.confirmed=e})},null,512),[[r.lH,I.confirmed]]),(0,r.Lk)("span",{class:"c-checkbox__text",innerHTML:I.trans("confirm_age_message",{age:I.product.required_age})},null,8,P)],2)])):(0,r.Q3)("",!0),I.messages.length>0?((0,r.uX)(),(0,r.CE)("div",j,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(I.messages,(function(e){return(0,r.uX)(),(0,r.Wv)(Q,{lines:e.lines,"without-icon":e.withoutIcon,"message-type":e.type},null,8,["lines","without-icon","message-type"])})),256))])):(0,r.Q3)("",!0),(0,r.Lk)("div",{class:(0,r.C4)(["o-modal__submit",{"is-disabled":!I.canSubmit}])},[(0,r.Lk)("button",{class:"c-button c-button--wide",type:"button",onClick:t[7]||(t[7]=function(){return I.submitForm&&I.submitForm.apply(I,arguments)})},[(0,r.Lk)("span",F,(0,r.v_)(I.trans("plan_day")),1)])],2),(0,r.Lk)("div",O,[(0,r.Lk)("button",{type:"button",class:"c-text-button c-text-button--wide c-text-button--font-size-s",onClick:t[8]||(t[8]=function(){return I.close&&I.close.apply(I,arguments)})},[(0,r.Lk)("span",U,(0,r.v_)(I.trans("cancel")),1)])])])):(0,r.Q3)("",!0)],2)])):(0,r.Q3)("",!0)}]])}}]);
//# sourceMappingURL=booking.js.map