1import{S as G}from"./DeW8I9Q9.js";import{d as R,r as L,C as y,c as u,o as t,a as l,a1 as Q,z as h,j as $,t as f,n as v,f as a,b as i,p as Y,F as A,_ as V,T as j,I as M,B as b,e as w,A as x,aq as C}from"#entry";import{A as S}from"./BrRXBPvg.js";import{_ as K}from"./SrOWI-ml.js";const W={class:"block__info"},H={class:"block__title"},J={class:"block__title-text"},X={key:0,class:"block__hint"},Z={class:"block__counters"},ee=["disabled"],se={class:"block__counter"},ne=R({__name:"PassengersModalItem",props:{passengerType:{},className:{},counter:{},popUp:{},hint:{}},emits:["on-passenger-remove","on-passenger-add"],setup(o){const c=o;L(!1);const d=y(()=>c.passengerType==="ÐоÑоÑлий"&&c.counter===1?!0:c.counter===0);return(r,e)=>{const s=Y;return t(),u(A,null,[l("div",{class:v(["block",o.className])},[l("div",W,[l("div",H,[l("span",J,f(o.passengerType),1),o.popUp?(t(),$(K,{key:0,class:"tooltip--desktop","tooltip-background":"transparent","icon-name":"question-circle","icon-color":"var(--monochrome-grey)","icon-size":"20",text:o.popUp},null,8,["text"])):h("",!0)]),o.hint?(t(),u("div",X,f(o.hint),1)):h("",!0)]),l("div",Z,[l("div",{class:v({forbidden:a(d)})},[l("button",{"aria-label":"Decrease amount of passengers",type:"button",class:v(["block__btn block__btn--decrease",{disabled:a(d)}]),disabled:a(d),onClick:e[0]||(e[0]=m=>r.$emit("on-passenger-remove"))},[i(s,{name:"my-icons:minus"})],10,ee)],2),l("span",se,f(o.counter),1),l("button",{"aria-label":"Increase amount of passengers",type:"button",class:"block__btn block__btn--increase",onClick:e[1]||(e[1]=m=>r.$emit("on-passenger-add"))},[i(s,{name:"my-icons:plus"})])])],2),Q(r.$slots,"default",{},void 0,!0)],64)}}}),k=V(ne,[["__scopeId","data-v-a2e26598"]]),te={key:0,class:"block__inputs-child"},ae={key:0,class:"block__inputs-child"},oe=R({__name:"PassengersModal",emits:["on-confirm"],setup(o,{emit:c}){const d=j(),{adults:r,animals:e,children:s}=M(d.search.passengers),{fetchQuery:m,validationErrors:I}=M(d),U=c,E=y(()=>!!s.value.ages.length),B=y(()=>!!e.value.weights.length);function P(){I.value.passengers=!1}function N(){r.value.count+=1}function O(){r.value.count!==1&&(r.value.count-=1)}function T(){s.value.ages.push({age:0})}function q(){if(s.value.ages.length!==0&&(s.value.ages.pop(),s.value.ages.length===0)){m.value[C.PASSENGERS].children={count:void 0,ages:[]};return}}function D(){e.value.weights.push({weight:0})}function z(){if(e.value.weights.length!==0&&(e.value.weights.pop(),e.value.weights.length===0)){m.value[C.PASSENGERS].animals={count:void 0,weights:[]};return}}function F(){U("on-confirm")}return(n,le)=>(t(),$(G,{class:"search__modal--passengers"},{default:b(()=>[i(k,{"passenger-type":n.$t("passengersModal.adult"),hint:n.$t("passengersModal.hints.ageAdult"),counter:a(r).count,onOnPassengerAdd:N,onOnPassengerRemove:O},null,8,["passenger-type","hint","counter"]),i(k,{"passenger-type":n.$t("passengersModal.child"),"pop-up":n.$t("passengersModal.hints.ageRequired"),hint:n.$t("passengersModal.hints.ageChild"),counter:a(s).ages.length,onOnPassengerAdd:T,onOnPassengerRemove:q},{default:b(()=>[a(E)?(t(),u("div",te,[(t(!0),u(A,null,w(a(s).ages,(p,g)=>(t(),$(S,{class:"app-input-box--child",type:"number",key:g,placeholder:`${n.$t("passengersModal.childAge")} ${g+1}`,modelValue:p.age,"onUpdate:modelValue":[_=>p.age=_,P],modelModifiers:{number:!0}},null,8,["placeholder","modelValue","onUpdate:modelValue"]))),128))])):h("",!0)]),_:1},8,["passenger-type","pop-up","hint","counter"]),i(k,{"passenger-type":n.$t("passengersModal.pet"),"pop-up":n.$t("passengersModal.hints.weightRequired"),counter:a(e).weights.length,onOnPassengerAdd:D,onOnPassengerRemove:z},{default:b(()=>[a(B)?(t(),u("div",ae,[(t(!0),u(A,null,w(a(e).weights,(p,g)=>(t(),u("div",{class:"block__inputs-inner",key:g},[i(S,{class:"app-input-box--animal",type:"number",placeholder:`${n.$t("passengersModal.petWeight")} ${g+1}`,modelValue:p.weight,"onUpdate:modelValue":[_=>p.weight=_,P],modelModifiers:{number:!0}},null,8,["placeholder","modelValue","onUpdate:modelValue"])]))),128))])):h("",!0)]),_:1},8,["passenger-type","pop-up","counter"]),i(x,{"button-style":"default-gold",text:n.$t("passengersModal.continueButton"),onClick:F},null,8,["text"])]),_:1}))}}),ce=V(oe,[["__scopeId","data-v-c05fa396"]]);export{ce as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.