1import{d as Q,u as J,r as U,j as X,a as Z,k as ee,o as a,c as l,e,b as t,t as r,G as se,at as te,x as _,F as y,I as $,Y as oe,W as ae,n as ne,v as z,A,z as g,g as le,bx as re}from"./vendor-lxhXACKn.js";import{a as ie,u as ce,b as de,v as ue}from"./formkit.theme-DVbh0M_W.js";import{j as pe,k as G}from"./computedProperties-CCrZrgkj.js";import"./globalBasic-DCViCoV8.js";import"./light-nUpfvi-t.js";const me={class:"lg:shadow-box-shadow2"},fe={key:0,class:"w-11/12 m-4 mb-0"},_e={for:"city-search",class:"sr-only"},ye=["placeholder"],ge={class:"sr-only"},he=["onClick","aria-label"],xe={class:"text-left"},be={class:"font-bold text-[16px] mr-1"},ve={class:"text-[12px]"},Ie=["onClick","aria-label"],Ce={class:"flex items-center w-1/2"},ke=["src","alt"],we={class:"font-bold text-[16px] mb-1"},Se={key:0,class:"text-[12px]"},Le={key:0,class:"flex w-1/2 flex-col text-right text-[11px] mr-2.5"},Be={key:0,class:"text-sm animate-pulse"},Ee={class:"mr-1"},De={class:"font-bold text-[16px]"},He={key:2,class:"text-sm"},$e=Q({__name:"SelectHotelDropdown",props:{type:{default:"dialog"},isWebComponent:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1}},setup(M){const m=M,{t:c}=J(),d=ie(),N=ce(),u=de(),j=U(!1),f=pe(),h=G(),p=U(""),F=X(),x=Z(),q=ee(()=>{const o=G().value;return p.value?o.filter(i=>i.toLowerCase().includes(p.value.toLowerCase())):o}),K=o=>{j.value=!1,d.setHotel(o),m.isWebComponent?(d.quickstarter.hotelId=o.slug,d.quickstarter.cityId=-1,N.hotelId=o.slug):x.push({name:"Main",params:{hotelID:o.slug}})},V=o=>{var n;const i=f.value[o][0].cityId;m.isWebComponent?(d.quickstarter.cityId=i,d.quickstarter.hotelId=-1):x.push({name:"map",params:{hotelID:(n=F.params)==null?void 0:n.hotelID,cityID:i}})};return(o,i)=>(a(),l("div",me,[e(h).length>3?(a(),l("div",fe,[t("label",_e,r(e(c)("WBEPLUS.SEARCH_CITY")),1),se(t("input",{id:"city-search",class:"w-full p-2 border rounded-md","onUpdate:modelValue":i[0]||(i[0]=n=>p.value=n),type:"text",placeholder:e(c)("WBEPLUS.SEARCH_CITY")},null,8,ye),[[te,p.value]])])):_("",!0),(a(!0),l(y,null,$(q.value,(n,Y)=>(a(),l("div",{key:Y,onKeydown:i[1]||(i[1]=oe(ae((...s)=>o.handleEnterKey&&o.handleEnterKey(...s),["prevent"]),["enter"])),class:ne([{"mt-8 !z-9999":m.type==="dialog","pt-0":e(h).length>3},"w-full rounded-md p-4 flex flex-col"])},[t("h2",ge,r(n),1),t("button",{onClick:s=>V(n),class:"flex items-center justify-between w-full p-2 border bg-surface-secondary cursor-pointer hover:scale-105 transition-all duration-500 rounded-md","aria-label":`${e(c)("WBEPLUS.SELECT_CITY")} ${n}`},[t("span",xe,[t("span",be,r(n),1),t("span",ve,r(e(f)[n][0].address.country),1)]),z(e(g),{icon:e(A)},null,8,["icon"])],8,he),(a(!0),l(y,null,$(e(f)[n],s=>{var b,v,I,C,k,w,S,L,B,E,D,H,P,T,W,O,R;return a(),l("div",{key:s.hotelId,class:"mt-2"},[t("button",{onClick:Pe=>K(s),class:"w-full text-left p-2 border flex items-center justify-between min-h-12 text-xs hover:bg-gray-100 cursor-pointer gap-4 roun
1ded-md focus:outline-none focus:ring focus:ring-info-border","aria-label":`${e(c)("WBEPLUS.SELECT_HOTEL")} ${s.name}, ${s.address.city}, ${s.address.country}`},[t("span",Ce,[(v=(b=s.logo)==null?void 0:b.size300)!=null&&v.url||(C=(I=s.logo)==null?void 0:I.sizeOriginal)!=null&&C.url?(a(),l("img",{key:0,src:((w=(k=s.logo)==null?void 0:k.size300)==null?void 0:w.url)||((L=(S=s.logo)==null?void 0:S.sizeOriginal)==null?void 0:L.url),alt:s.name,class:"w-8 h-8 object-contain mr-2"},null,8,ke)):(a(),le(e(g),{key:1,icon:e(re),class:"text-text-brand text-[20px] mr-2"},null,8,["icon"])),t("span",null,[t("span",we,r(s.name),1),n!=s.address.city?(a(),l("span",Se,r(s.address.city)+" - "+r(s.address.country),1)):_("",!0)])]),((E=(B=e(u).settings)==null?void 0:B.multiProperties)==null?void 0:E.length)<=10?(a(),l("span",Le,[o.isLoading&&!e(u).plansByHotel["_"+s.hotelId]?(a(),l("span",Be,r(e(c)("GLOBAL.LOADING")),1)):(H=(D=e(u).plansByHotel["_"+s.hotelId])==null?void 0:D[0])!=null&&H.totalPrice?(a(),l(y,{key:1},[t("p",null,[t("span",Ee,r(e(c)("WBEPLUS.FROM")),1),t("span",De,r(e(ue)(((T=(P=e(u).plansByHotel["_"+s.hotelId])==null?void 0:P[0])==null?void 0:T.totalPrice)/(((R=(O=(W=e(u).plansByHotel["_"+s.hotelId])==null?void 0:W[0])==null?void 0:O.dayPrices)==null?void 0:R.length)??1))),1)]),t("p",null,r(e(c)("ADMINP.PRICENIGHT")),1)],64)):(a(),l("span",He,r(e(c)("WBEPLUS.SOLDOUT")),1))])):_("",!0),z(e(g),{icon:e(A)},null,8,["icon"])],8,Ie)])}),128))],34))),128))]))}});export{$e 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.