1import{R as x}from"./RatePlanComponent-DeReNFCA.js";import{S as C}from"./mealPlanIcons-CJXobQye.js";import{s as v}from"./pinia-C_esPC0q.js";import{useOffersStore as I}from"./offers.store-C8v5MVWp.js";import{u as D,b as j}from"./vue-router-BGgiyEqQ.js";import{W as q}from"./WarningBanner-CpOaEuIS.js";import{_ as z,j as F,H as N}from"./index-une70pyI.js";import{r as Q,c as T,w as g,f as n,g as m,s as y,x as W,z as u,a as h,F as E}from"./@vue-DIGZGmoa.js";import"./WarningInfo-BBYn47kS.js";import"./info-CCbyvWbq.js";import"./exclamation-triangle-Clv-pbQA.js";import"./ApiHtmlContent-BcQ4mfvm.js";import"./dompurify-BpHzDiVx.js";import"./vue3-lottie-Bk0qjQnk.js";import"./lottie-web-DiXPyFxs.js";import"./mealPlanDisplay-DbIR0DeL.js";import"./swiper-Cht_5FR3.js";import"./date-fns-Dzy_VLxG.js";import"./vue-i18n-B-2Lrc-X.js";import"./@intlify-Y34EtYYP.js";import"./tailwindcss-DF6Njrav.js";import"./picocolors-CBpy9uNM.js";import"./axios-DTyqpfTh.js";import"./vue-multiselect-DTwXaS1-.js";import"./@kyvg-DhHREgvS.js";import"./@dash0-D1h7I60T.js";const H={key:1},L={key:2},M={__name:"RatePlanDetails",props:{rateResultOverride:{type:Object,default:null}},emits:["select","view-room-details"],setup(c,{emit:_}){const f=D(),k=j(),p=_,l=c,d=Q(2),b=I(),w=F(),{resultsByRate:S,loading:s}=v(b),{activatedPromotionalCodes:O}=v(w),R=N(f.params.id??""),i=R?String(R).split("."):[];i.length===2&&(d.value=1);const a=T(()=>{if(l.rateResultOverride)return l.rateResultOverride;let r=S.value.find(t=>t.rate_plan_code==i[0]);if(!r)return null;let e={...r};if(i.length==2){const t=e.offers.findIndex(o=>o.room_type_code==i[1]);if(t>-1&&t!==0){const[o]=e.offers.splice(t,1);e.offers.unshift(o)}}return e}),P=(r,e)=>{p("select",r,e)};return g(O,async(r,e)=>{if(!l.rateResultOverride&&(e==null?void 0:e.length)===1&&(r==null?void 0:r.length)===0&&(s.value&&await new Promise(t=>{const o=g(s,B=>{B||(o(),t())})}),!a.value)){const t={...f.query};k.push({name:"search",query:t})}}),window.scrollTo({top:0,behavior:"smooth"}),(r,e)=>(n(),m(E,null,[!a.value&&!y(s)?(n(),W(q,{key:0,message:r.$t("UnavailabilityMessage"),class:"w-full"},null,8,["message"])):u("",!0),y(s)&&!c.rateResultOverride?(n(),m("div",H,[h(C,{class:"mb-3 h-[34rem] w-full rounded-gc-lg",type:"rectangle",bgClass:"bg-palette-secondary-7",shimmerColor:"var(--color-skeleton-shimmer)"})])):u("",!0),a.value?(n(),m("div",L,[h(x,{rateResult:a.value,details:!0,initialResults:d.value,onSelect:e[0]||(e[0]=(t,o)=>P(t,o)),onViewRoomDetails:e[1]||(e[1]=t=>p("view-room-details",t))},null,8,["rateResult","initialResults"])])):u("",!0)],64))}},ve=z(M,[["__scopeId","data-v-6bf9d1ff"]]);export{ve as default}; 2//# sourceMappingURL=RatePlanDetails-BJ4lKXMS.js.map
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.