1import{R as A,u as O,b as T,v as x}from"./formkit.theme-DVbh0M_W.js";import{d as D,u as M,k as B,r as H,o as l,c as o,b as s,t as a,e as n,F as _,I as g,D as R,x as h}from"./vendor-lxhXACKn.js";import"./globalBasic-DCViCoV8.js";const G={class:"w-full text-text-primary !text-sm"},U={class:"mb-8",role:"region","aria-labelledby":"room-section"},j={class:"border rounded-sm lg:bg-surface-primary lg:bg-surface-primary bg-surface-md border-border-primary"},$={class:"border-b p-3"},K={id:"room-section",class:"font-bold text-lg capitalize"},W={class:"flex justify-between items-center p-3",role:"row"},V={class:"text-xs"},F={class:"font-bold text-sm"},X={class:"text-text-secondary font-bold text-sm mt-2"},z=["innerHTML"],q=["innerHTML"],J={class:"text-right"},Q={class:"font-bold text-sm","aria-label":"Room price: {{ formatPrice(group.totalPrice) }}"},Y={class:"text-text-secondary text-[10px]","aria-label":"Average price per night: {{ formatPrice(group.sample.averageDayPrice) }}"},Z=["aria-expanded","aria-controls","onClick"],ee={key:1,"aria-label":"Reservation status: Canceled"},te=["id"],se={class:"text-xs"},ae={class:"font-bold"},ne={class:"text-text-secondary text-[10px]"},re={class:"text-right"},ie={class:"text-sm font-bold"},le={class:"text-text-secondary text-[10px]"},oe={class:"border mb-8 rounded-sm border-border-primary lg:bg-surface-primary bg-surface-md",role:"region","aria-labelledby":"extras-section"},ce={class:"border-b p-3"},de={id:"extras-section",class:"font-bold text-lg"},pe={class:"text-right"},ue={"aria-label":"Extra price: {{ formatPrice(extra.price) }}"},_e={key:1,"aria-label":"Extra status: Canceled"},be={key:1,class:"w-full text-center p-4","aria-live":"polite"},xe={class:"border lg:bg-surface-primary bg-surface-md rounded-sm border-border-primary",role:"region","aria-labelledby":"total-price-section"},fe={class:"items-center justify-between p-3 w-full flex flex-col gap-4"},ge={class:"flex justify-between w-full"},he={id:"total-price-section",class:"font-bold"},ye={key:0,class:"font-bold text-sm","aria-label":"Total price: {{ formatPrice(reservation.price) }}"},me={key:1,"aria-label":"Reservation status: Canceled"},Pe=D({__name:"RoomsAndExtras",props:{reservation:{default:()=>new A({})},rateInfoMap:{default:()=>({})}},setup(C){const{t:p}=M(),u=O(),m=T(),k=C,v=t=>{var r;return((r=k.rateInfoMap)==null?void 0:r[String(t==null?void 0:t._rateKey)])||null},L=t=>{var r,c,e,i;return((c=(r=v(t))==null?void 0:r.name)==null?void 0:c[u.language])||((i=(e=t==null?void 0:t.plan)==null?void 0:e.name)==null?void 0:i[u.language])||(t==null?void 0:t.rateName)||""},w=t=>{var r,c,e,i,d,b;return((c=(r=t==null?void 0:t.condition)==null?void 0:r.text)==null?void 0:c[u.language])||((i=(e=t==null?void 0:t.plan)==null?void 0:e.conditions)==null?void 0:i[u.language])||((b=(d=v(t))==null?void 0:d.conditions)==null?void 0:b[u.language])||""},I=B(()=>{var c;const t=((c=k.reservation)==null?void 0:c.rooms)??[],r=new Map;return t.forEach((e,i)=>{const d=`${e==null?void 0:e.id}|${(e==null?void 0:e.rateName)??"noRate"}`;r.has(d)||r.set(d,{sample:e,items:[]}),r.get(d).items.push({room:e,idx:i})}),Array.from(r.entries()).map(([e,i])=>{const d=i.items.length,b=i.items.reduce((y,N)=>{var P;return y+(((P=N.room)==null?void 0:P.price)||0)},0);return{key:e,count:d,sample:i.sample,items:i.items,totalPrice:b}})}),f=H(new Set),S=t=>{const r=new Set(f.value);r.has(t)?r.delete(t):r.add(t),f.value=r},E=t=>{var r,c,e,i;return((c=(r=v(t))==null?void 0:r.additionalInfo)==null?void 0:c[u.language])||((i=(e=t==null?void 0:t.plan)==null?void 0:e.additionalInfo)==null?void 0:i[u.language])||""};return(t,r)=>{var c;return l(),o("div",G,[s("div",U,[s("div",j,[s("div",$,[s("h2",K,a(n(p)("MAIN.ROOM")),1)]),(l(!0),o(_,null,g(I.value,e=>{var i;return l(),o("div",{key:e.key,class:"lg:border-b",role:"rowgroup"},[s("div",W,[s("div",V,[s("p",F,[e.count>=2?(l(),o(_,{key:0},[R(a(e.count)+"Ã",1)],64)):h("",!0),R(" "+a((i=n(m).roomContentByRoomId[e.sample.id])==null?void 0:i.name[n(u).language]),1)]),s("p",X,a(L(e.sample)),1),E(e.sample)?(l(),o("p",{key:0,class:"mb-4 text-[10px]",innerHTML:E(e.sample)},null,8,z)):h("",!0),s("p",{class:"text-text-secondary text-[10px] custom-html",innerHTML:w(e.sample)},null,8,q)]),s("div",J,[t.reservation.status!==3?(l(),o(_,{key:0},[s("p",Q,a(n(x)(e.totalPrice)),1),s("p",Y,a(n(x)(e.sample.averageDayPrice))+" "+a(n(p)("ADMINP.PRICENIGHT")),1),e.count>=2?(l(),o("button",{key:0,class:"underline text-[10px] mt-1",type:"button","aria-expanded":f.value.has(e.key),"aria-controls":`group-${e.key}`,onClick:d=>S(e.key)},a(f.value.has(e.key)?n(p)("WBEPLUS.HIDE_ALL"):n(p)("WBEPLUS.SHOW_MORE")),9,Z)):h("",!0)],64)):(l(),o("p",ee,a(n(p)("RESLOOKUP.CANCELED")),1))])]),e.count>=2&&f.value.has(e.key)?(l(),o("div",{key:0,id:`group-${e.key}`,class:"pl-3 pr-3 pb-3",role:"region"},[(l(!0),o(_,null,g(e.items,({room:d},b)=>{var y;return l(),o("div",{key:b,class:"flex justify-between items-start py-2 border-t"},[s("div",se,[s("p",ae,a(b+1)+". "+a((y=n(m).roomContentByRoomId[d.id])==null?void 0:y.name[n(u).language]),1),s("p",ne,a(d.rateName),1)]),s("div",re,[s("p",ie,a(n(x)(d.price)),1),s("p",le,a(n(x)(d.averageDayPrice))+" "+a(n(p)("ADMINP.PRICENIGHT")),1)])])}),128))],8,te)):h("",!0)])}),128))])]),s("div",oe,[s("div",ce,[s("h2",de,a(n(p)("CAPTION.EXTRAS")),1)]),t.reservation.extras.length?(l(!0),o(_,{key:0},g(t.reservation.extras,e=>(l(),o("div",{key:e.id,class:"flex justify-between p-3 lg:border-b font-bold text-sm",role:"row"},[s("p",null,a(e.name),1),s("div",pe,[t.reservation.status!==3?(l(),o(_,{key:0},[s("p",ue,a(n(x)(e.price)),1),(l(!0),o(_,null,g(e.priceBreakDown,i=>(l(),o("p",{key:i.price,class:"text-text-secondary text-[10px]","aria-label":"Breakdown: {{ breakdown.multiplier }} x {{ formatPrice(breakdown.price) }}"},a(i.multiplier)+" x "+a(n(x)(i.price)),1))),128))],64)):(l(),o("p",_e,a(n(p)("RESLOOKUP.CANCELED")),1))])]))),128)):(l(),o("div",be,a(n(p)("WBEPLUS.NO_EXTRAS")),1))]),s("div",xe,[s("div",fe,[s("div",ge,[s("h2",he,a(n(p)("GLOBAL.TOTAL")),1),s("div",null,[t.reservation.status!==3?(l(),o("p",ye,a(n(x)(t.reservation.price)),1)):(l(),o("p",me,a(n(p)("RESLOOKUP.CANCELED")),1))])]),t.reservation.status!==3?(l(!0),o(_,{key:0},g((c=n(m).hotelContent)==null?void 0:c.taxes,e=>(l(),o("div",{key:e[n(u).language],class:"flex-1 w-full text-right mb-1 text-[10px]","aria-label":"Tax: {{ tax[globalStore.language] }}"},a(e[n(u).language]),1))),128)):h("",!0)])])])}}});
1export{Pe 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.