1"use strict";(self.webpackChunklanding_page=self.webpackChunklanding_page||[]).push([[873,2230,3635],{270:(o,e,i)=>{i.d(e,{N:()=>u});var l=i(5043),n=i(7100),t=i(5989),d=i(7343);const a=new Set((0,n.X6)()),s=o=>{const e="string"===typeof o?o.replace(/[^a-zA-Z]/g,"").toUpperCase():"";return a.has(e)?e:null};let r=null;const c=async()=>{const o=s(t.A.get("country_code"));return o||(r||(r=(0,d.ow)().then(o=>{const e=s(null===o||void 0===o?void 0:o.country);return e?(t.A.set("ipAdress",o.ip),t.A.set("city",o.city),t.A.set("state",o.region),t.A.set("country",o.country_name),t.A.set("country_code",e),t.A.set("dialcode",o.country_calling_code),t.A.set("locationDetails",o),e):null}).catch(()=>null)),r)};function u(o){const[e,i]=(0,l.useState)(()=>s(t.A.get("country_code"))||null);return(0,l.useEffect)(()=>{if(e)return;let o=!1;return c().then(e=>{!o&&e&&i(e)}),()=>{o=!0}},[e]),console.log("hotel?.country",o),e||s(o)||"US"}},2015:()=>{},3635:(o,e,i)=>{i.r(e),i.d(e,{default:()=>d});var l=i(5043),n=i(5346),t=i(579);const d=o=>{let{name:e="",address:i=""}=o;(0,l.useEffect)(()=>{(e||i)&&(console.log("map","name",e,"address",i),(0,n.fireGtmEvent)("map_viewed",{hotel_name:e,hotel_address:i}))},[e,i]);return(0,t.jsx)("div",{className:"googleMap2",children:(0,t.jsx)("iframe",{title:"".concat(e,"'s map"),width:"100%",height:"300px",style:{border:0,position:"relative"},loading:"lazy",allowFullScreen:!0,referrerPolicy:"no-referrer-when-downgrade",src:"https://www.google.com/maps/embed/v1/place?key=".concat("AIzaSyD-cy41yGHhoKmLMDWzJlVPD3whRZQr1-I","\n &q=").concat(encodeURIComponent("".concat(e," ").concat(i))),onLoad:()=>{(0,n.fireGtmEvent)("map_loaded",{hotel_name:e,hotel_address:i})}})})}},3804:(o,e,i)=>{i.d(e,{i:()=>l});const l={HOME:{TRAVEL_ITINERARY:"pages.home.travelItinerary",MAP:"pages.home.map",PAYMENT_FOOTER:"pages.home.paymentFooter",SOCIAL_PROOF:"pages.home.socialProof",FOOTER_BRAND_NAME:"pages.home.footer.brandName",ROOMS:{GUEST_INFO:"pages.home.rooms.showGuestInfo"}},CHECKOUT:{FLASH_SALE_CARD:"pages.checkout.flashSaleCard",BOOK_WITH_CONFIDENCE:"pages.checkout.bookWithConfidence",BOOKING_CONFIRMATION:"pages.checkout.bookWithConfidence.bookingConfirmation",INSTANT_REFUND:"pages.checkout.bookWithConfidence.instantRefund",CUSTOMER_SUPPORT:"pages.checkout.bookWithConfidence.customerSupport",RETARGETING_POPUP:"pages.checkout.retargetingPopup"},UI:{COLORS:"ui.colors",PRIMARY_COLOR:"ui.colors.primary",PRIMARY_GRADIENT:"ui.colors.primaryGradient",TEXT_COLOR:"ui.colors.text",DISCOUNT_COLOR:"ui.colors.discount",PROMOTIONS:"ui.colors.promotions",FONTS:"ui.fonts",FILTERS:"ui.filters"}}},3815:()=>{},4116:(o,e,i)=>{i.d(e,{i:()=>n});var l=i(7343);const n=function(o,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const l=c(o,e,i);r(e,i),m(l),p(l,e,i)},t="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap",d="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Roboto:wght@400;500;600;700&display=swap",a="https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&display=swap",s="https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;500;600;700&display=swap",r=(o,e)=>{if("undefined"===typeof document)return;const i=106023===(null===o||void 0===o?void 0:o.userId)||392===(null===o||void 0===o?void 0:o.id)||106023===(null===e||void 0===e?void 0:e.userId)||392===(null===e||void 0===e?void 0:e.hotelId),l="zinc"===(null===o||void 0===o?void 0:o.chainName)?d:"beacon"===(null===o||void 0===o?void 0:o.chainName)||2825===(null===o||void 0===o?void 0:o.id)?t:i?a:29727===(null===o||void 0===o?void 0:o.id)||29903===(null===o||void 0===o?void 0:o.id)?s:null;if(!l||document.querySelector('link[data-hotelzify-font="'.concat(l,'"]')))return;const n=document.createElement("link");n.rel="stylesheet",n.href=l,n.media="print",n.onload=()=>{n.media="all"},n.dataset.hotelzifyFont=l,document.head.appendChild(n)},c=function(o,e){var i;let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return null!==o&&void 0!==o&&null!==(i=o.ui)&&void 0!==i&&i.colors?u(o):v(e,l)},u=o=>{var e,i,l,n,t,d,a,s,r,c;const{colors:u,fonts:v,filters:m}=o.ui;let p,h;if(null!==u&&void 0!==u&&null!==(e=u.primaryGradient)&&void 0!==e&&e.enabled){const{start:o,end:e,angle:i="95deg"}=u.primaryGradient;p="linear-gradient(".concat(i,", ").concat(o,", ").concat(e,")"),h=o}else null!==u&&void 0!==u&&u.primary?(p=u.primary,h=u.primary):(p="linear-gradient(95deg,#53b2fe,#065af3)",h="#53b2fe");return{color:p,solidColor:h,textClr:(null===u||void 0===u?void 0:u.text)||"#0078d4",discountClr:(null===u||void 0===u?void 0:u.discount)||"#0078d4",bulkBackgroun
1d:(null===u||void 0===u||null===(i=u.promotions)||void 0===i||null===(l=i.bulk)||void 0===l?void 0:l.background)||"#deecff",bulkBorder:(null===u||void 0===u||null===(n=u.promotions)||void 0===n||null===(t=n.bulk)||void 0===t?void 0:t.border)||"#3274d2",earlyBackground:(null===u||void 0===u||null===(d=u.promotions)||void 0===d||null===(a=d.early)||void 0===a?void 0:a.background)||"#ffe0c9",earlyBorder:(null===u||void 0===u||null===(s=u.promotions)||void 0===s||null===(r=s.early)||void 0===r?void 0:r.border)||"#d56e23",promotionText:(null===u||void 0===u||null===(c=u.promotions)||void 0===c?void 0:c.text)||"#000000",amenityFilter:(null===m||void 0===m?void 0:m.amenityFilter)||"",imageFilter:(null===m||void 0===m?void 0:m.imageFilter)||"",primaryFont:(null===v||void 0===v?void 0:v.primary)||'"Jakarta", sans-serif',secondaryFont:(null===v||void 0===v?void 0:v.secondary)||'"Jakarta", sans-serif'}},v=function(o){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i="linear-gradient(95deg,#53b2fe,#065af3)",n="#53b2fe",t="#0078d4",d="",a="",s="",r="",c="#3274d2",u="",v="#d56e23",m="",p='"Jakarta", sans-serif',h='"Jakarta", sans-serif';l.lT.includes(null===o||void 0===o?void 0:o.id)&&(i="#FF4E63",n="#FF4E63"),29727!==(null===o||void 0===o?void 0:o.id)&&29903!==(null===o||void 0===o?void 0:o.id)&&29947!==(null===o||void 0===o?void 0:o.id)&&29946!==(null===o||void 0===o?void 0:o.id)||(i="#88B341",n="#88B341"),63809===(null===o||void 0===o?void 0:o.userId)&&(i="#892680",n="#892680"),72===(null===o||void 0===o?void 0:o.chainId)&&(i="#5b1d22",n="#5b1d22"),127534===(null===o||void 0===o?void 0:o.userId)&&(i="#ffcc09",n="#ffcc09"),"beacon"!==(null===o||void 0===o?void 0:o.chainName)&&2825!==(null===o||void 0===o?void 0:o.id)||(i="#2a5470",n="#2a5470",p='"Roboto", sans-serif',h='"Roboto", sans-serif'),"zinc"===(null===o||void 0===o?void 0:o.chainName)&&(i="#D2812B",n="#D2812B",p='"Montserrat", sans-serif',h='"Roboto", sans-serif');return(106023===(null===o||void 0===o?void 0:o.userId)||392===(null===o||void 0===o?void 0:o.id)||106023===(null===e||void 0===e?void 0:e.userId)||392===(null===e||void 0===e?void 0:e.hotelId))&&(i="#2B4039",n="#2B4039",t="#2B4039",a="#B55B5A",d="brightness(0) saturate(100%) invert(17%) sepia(10%) saturate(700%) hue-rotate(120deg) brightness(85%) contrast(95%)",r="#2B4039",c="#1F2A26",u="#B55B5A",v="#923F3E",s="white",m="none",p="'Source Sans 3', 'Poppins', 'Inter', sans-serif",h="'Source Sans 3', 'Poppins', 'Inter', sans-serif"),29727!==(null===o||void 0===o?void 0:o.id)&&29903!==(null===o||void 0===o?void 0:o.id)||(p="'Source Serif 4', 'Poppins', 'Inter', sans-serif"),{color:i,solidColor:n,textClr:t,discountClr:a,bulkBackground:r,bulkBorder:c,earlyBackground:u,earlyBorder:v,promotionText:s,amenityFilter:d,imageFilter:m,primaryFont:p,secondaryFont:h}},m=o=>{document.documentElement.style.setProperty("--blue",o.color),document.documentElement.style.setProperty("--blue-solid",o.solidColor),document.documentElement.style.setProperty("--blueText",o.textClr),document.documentElement.style.setProperty("--volte",o.primaryFont),document.documentElement.style.setProperty("--firasans",o.secondaryFont),document.documentElement.style.setProperty("--blue-gradient",o.color),document.documentElement.style.setProperty("--discount-color",o.discountClr||o.textClr),document.documentElement.style.setProperty("--bulk-bg",o.bulkBackground||"#deecff"),document.documentElement.style.setProperty("--bulk-border",o.bulkBorder||"#3274d2"),document.documentElement.style.setProperty("--early-bg",o.earlyBackground||"#ffe0c9"),document.documentElement.style.setProperty("--early-border",o.earlyBorder||"#d56e23"),document.documentElement.style.setProperty("--promotion-text",o.promotionText||"#000000"),document.documentElement.style.setProperty("--amenity-filter",o.amenityFilter||"none"),document.documentElement.style.setProperty("--image-filter",o.imageFilter||"none");const e=o.solidColor?"".concat(o.solidColor,"20"):"rgba(83, 178, 254, 0.125)";document.documentElement.style.setProperty("--blue-in-range",e);const i=o.solidColor?"".concat(o.solidColor,"10"):"rgba(83, 178, 254, 0.06)";document.documentElement.style.setProperty("--blue-reserved",i)},p=function(o,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(106023===(null===e||void 0===e?void 0:e.userId)||392===(null===e||void 0===e?void 0:e.id)||106023===(null===i||void 0===i?void 0:i.userId)||392===(null===i||void 0===i?void 0:i.hotelId))&&(document.querySelectorAll(".promotionContent img").forEach(e
1=>{e.style.filter=o.imageFilter||"none"}),document.querySelectorAll(".landingPage__Amenity").forEach(e=>{e.style.filter=o.amenityFilter||""}),document.querySelectorAll(".promotionText").forEach(e=>{e.style.color=o.promotionText||""}),document.querySelectorAll(".recommended").forEach(e=>{e.style.color=o.discountClr||"",e.style.border="1px solid ".concat(o.discountClr||"#0078d4")}),document.querySelectorAll(".discountedPrice").forEach(e=>{e.style.color=o.discountClr||""}),document.querySelectorAll(".bulk").forEach(e=>{e.style.background=o.bulkBackground||"",e.style.border="1px solid ".concat(o.bulkBorder||"none")}),document.querySelectorAll(".early").forEach(e=>{e.style.background=o.earlyBackground||"",e.style.border="1px solid ".concat(o.earlyBorder||"none")}))}},5493:()=>{},5658:(o,e,i)=>{i.d(e,{A:()=>c});i(5043);var l=i(5346),n=i(8532),t=i(7343),d=i(7574),a=i(4117),s=i(579);const r="https://ik.imagekit.io/hotelzifyprod/assets/images/user.svg",c=o=>{var e,i,c;let{room:u,quantity:v=1,addons:m,isConfirm:p=!1,isCheckout:h=!1,guestCount:g="0"}=o;const{roomName:y="Single Room",defaultGuestCount:f,RoomImages:x,HotelRoomAmenities:_,maxGuestCount:j}=u;console.log("room",u);const{t:b}=(0,a.Bd)();return(0,s.jsxs)("div",{className:"previewRoom",children:[(0,s.jsxs)("div",{className:"previewRoomTop",children:[(0,s.jsx)("img",{src:null!==(e=x[0])&&void 0!==e&&e.cdnImageUrl?(null===(i=x[0])||void 0===i?void 0:i.cdnImageUrl)+"?tr=w-auto-720,ar-1-1,h-600,q-".concat(t.Y$):"https://ik.imagekit.io/hotelzifyprod/logo.png?tr=q-".concat(t.Y$),alt:"logo",width:"60px",height:"60px",loading:"lazy",style:{borderRadius:"5px",objectFit:"cover",cursor:"pointer"},onClick:()=>(0,l.fireGtmEvent)("checkout_summary_room_thumb_clicked",{room_name:y})}),(0,s.jsxs)("div",{className:"previewRoom__info",children:[(0,s.jsxs)("h2",{children:[y," ",v>1&&" x ".concat(v)]}),h?(0,s.jsxs)("div",{className:"previewRoom__infoText",children:[(0,s.jsx)("span",{children:(0,s.jsx)("img",{src:r,alt:"user"})}),(0,s.jsxs)("p",{children:[g," ",b("guests")]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"previewRoom__infoText",children:[(0,s.jsx)("span",{children:(0,s.jsx)("img",{src:r,alt:"user"})}),(0,s.jsxs)("p",{children:[f," ",b("person")]})]}),(0,s.jsxs)("div",{className:"previewRoom__infoText",children:[(0,s.jsx)("span",{children:(0,s.jsx)("img",{src:r,alt:"user"})}),(0,s.jsxs)("p",{children:[b("max")," ",j," ",b("person")]})]})]})]})]}),(null===m||void 0===m?void 0:m.length)>0&&(0,s.jsx)("div",{className:"previewRoom__addons",children:null===(c=[...new Set(m)])||void 0===c?void 0:c.map((o,e)=>{var i,l;return(0,s.jsxs)("div",{className:"previewRoom__infoText",children:[(0,s.jsx)("span",{children:(0,s.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/assets/images/food.svg",alt:"food"})}),(0,s.jsxs)("p",{children:[null===o||void 0===o||null===(i=o.Addon)||void 0===i?void 0:i.name," x"," ",p?null===o||void 0===o?void 0:o.quantity:null===m||void 0===m||null===(l=m.filter(e=>{var i,l;return(null===e||void 0===e||null===(i=e.Addon)||void 0===i?void 0:i.name)===(null===o||void 0===o||null===(l=o.Addon)||void 0===l?void 0:l.name)}))||void 0===l?void 0:l.length," "]})]},e)})}),(null===_||void 0===_?void 0:_.length)>0&&!h&&(0,s.jsx)("div",{className:"previewRoom__amenities",children:null===_||void 0===_?void 0:_.map(o=>{var e,i,l,t,a,r,c;return(0,s.jsxs)("p",{children:[(0,s.jsx)(d.A,{iconName:n.j[null===o||void 0===o||null===(i=o.Amenity)||void 0===i?void 0:i.name],tooltip:null===o||void 0===o||null===(l=o.Amenity)||void 0===l?void 0:l.name}),(null===o||void 0===o||null===(t=o.Amenity)||void 0===t||null===(a=t.Trasalations)||void 0===a||null===(r=a[0])||void 0===r?void 0:r.name)||(null===o||void 0===o||null===(c=o.Amenity)||void 0===c?void 0:c.name)]},null===o||void 0===o||null===(e=o.Amenity)||void 0===e?void 0:e.name)})})]})}},5937:(o,e,i)=>{i.r(e),i.d(e,{default:()=>u});var l=i(5043),n=i(2582),t=i(4117),d=i(1526),a=i(5989),s=i(5346),r=i(5323),c=i(579);const u=o=>{let{isHotel:e=!0,slug:i="",id:u="",name:v="",brandName:m=""}=o;const[p,h]=(0,l.useState)("en"),g=(0,r.zy)(),y=(0,r.W6)(),[f]=(0,l.useState)(["www.bookmystay.io","bookmystay.io","dev.hotelzify.com","hotelzify.com","www.hotelzify.com"].includes(window.location.host)),[x]=(0,l.useState)(["dev.hotelzify.com","hotelzify.com","www.hotelzify.com","localhost:3005","booking.sterlingholidays.com","bookings.mhohotels.com","bookings.thealtruisthotels.com","bookings.subahotels.com","bookings.burgbnb.com","bookings.fernhotels.com","bookings.thealtitudehotels.com","stay.clubmahindra.com","bookings.rocklandhotels.com","bookings.oliveliving.com","booking.o
1penhotels.in","booking.envihotel.com","owniacollection.com"].includes(window.location.host)),{t:_}=(0,t.Bd)();(0,l.useEffect)(()=>{let o=a.A.get("lang")||"en";h(o)},[]);return(0,c.jsxs)("footer",{className:"footer",id:"footer",role:"contentinfo",children:[(0,c.jsxs)("div",{className:"footerTexts",children:[!e&&(0,c.jsx)("p",{children:(0,c.jsx)(n.N_,{style:{textDecoration:"none",color:"var(--text-gray)"},to:"/privacy-policy",children:_("privacy_policy")})}),!e&&(0,c.jsx)("p",{children:(0,c.jsx)(n.N_,{style:{textDecoration:"none",color:"var(--text-gray)"},to:"/terms-conditions",children:_("terms_and_conditions")})}),e&&(0,c.jsxs)("label",{htmlFor:"language-selector",style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"10px"},children:[(0,c.jsx)("span",{id:"language-selector-label",children:_("change_language")}),(0,c.jsxs)("select",{id:"language-selector",name:"language",style:{border:"none",background:"transparent"},value:p,onChange:o=>{var e,i;let l=o.target.value;(0,s.fireGtmEvent)("language_changed",{languageSelected:l});const n=new URLSearchParams(g.search);n.set("language",l),y.push({pathname:g.pathname,search:n.toString()}),h(l),a.A.set("lang",l),(0,d.Ip)(l),null===(e=window)||void 0===e||null===(i=e.location)||void 0===i||i.reload()},"aria-labelledby":"language-selector-label",children:[(0,c.jsx)("option",{value:"en",children:"English"}),(0,c.jsx)("option",{value:"hi",children:"Hindi"}),(0,c.jsx)("option",{value:"de",children:"German"}),(0,c.jsx)("option",{value:"ar",children:"Arabic"}),(0,c.jsx)("option",{value:"zh",children:"Chinese"}),(0,c.jsx)("option",{value:"hr",children:"Croatian"}),(0,c.jsx)("option",{value:"cs",children:"Czech"}),(0,c.jsx)("option",{value:"fr",children:"French"}),(0,c.jsx)("option",{value:"it",children:"Italian"}),(0,c.jsx)("option",{value:"pl",children:"Polish"}),(0,c.jsx)("option",{value:"pt",children:"Portuguese"}),(0,c.jsx)("option",{value:"sl",children:"Slovenian"}),(0,c.jsx)("option",{value:"es",children:"Spanish"})]})]}),e&&(0,c.jsx)("p",{children:(0,c.jsx)(n.N_,{style:{textDecoration:"none",color:"var(--text-gray)"},to:{pathname:x?"/".concat(i,"/privacy-policy"):"/privacy-policy",state:{slug:i}},children:_("privacy_policy")})}),e&&(0,c.jsx)("p",{children:(0,c.jsx)(n.N_,{style:{textDecoration:"none",color:"var(--text-gray)"},to:{pathname:x?"/".concat(i,"/terms-conditions"):"/terms-conditions",state:{slug:i}},children:_("terms_and_conditions")})}),(0,c.jsxs)("p",{style:{display:"flex",gap:"5px"},children:[_("powered_by")," ",(0,c.jsxs)("a",{href:"https://hotelzify.com",target:"_blank",rel:"noopener noreferrer","aria-label":"Visit Hotelzify website (opens in new tab)",children:[" ","Hotelzify"]})]})]}),(0,c.jsx)("div",{className:"footerAddress",style:{color:"#000"},children:(0,c.jsxs)("p",{style:{textTransform:"uppercase"},children:[_("copyrights")," \xa9"," ",null!==m&&void 0!==m&&m.trim()?m:v.split("|")[0]||v,"."," ",_("all_rights_reserved")]})}),!e&&(0,c.jsxs)("div",{className:"footerAddress",children:[(0,c.jsxs)("p",{children:[_("please_reach_us_at")," ",(0,c.jsx)("a",{href:"tel:+917975660291","aria-label":"Call Hotelzify at 79756 60291",children:"79756 60291"})]}),(0,c.jsx)("p",{children:"S4-101, Greenwood Regency, Bengaluru, Karnataka 560035"})]})]})}},6230:(o,e,i)=>{i.d(e,{A:()=>d});var l=i(5043),n=i(8601),t=i(579);const d=o=>{let{amount:e,isScriptLoaded:i,email:d}=o;const{paymentProvider:a}=(0,n.d4)(o=>o.hotelInfo);return(0,l.useEffect)(()=>{window.PaidYET&&i&&(window.PaidYET.setSandbox(!0),window.PaidYET.init(null===a||void 0===a?void 0:a.vendorSubdomain),window.PaidYET.renderCOFForm("card-element-cof"))},[window,i,a]),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,t.jsx)("p",{style:{color:"#000"},children:(0,t.jsx)("b",{children:"Payment Option"})}),(0,t.jsx)("div",{id:"card-element-cof","data-amountreadonly":e,"data-hidenotes":!0}),(0,t.jsx)("div",{id:"card-errors"})]})}},7918:(o,e,i)=>{i.r(e),i.d(e,{default:()=>O});var l=i(9379),n=i(446),t=i.n(n),d=i(5043),a=i(1591),s=i(8601),r=i(9634),c=(i(957),i(5937)),u=i(6713),v=i(3635),m=i(5658),p=i(8984),h=i(4849),g=i(7100),y=(i(5493),i(3815),i(3976)),f=(i(475),i(7478)),x=i(9368),_=(i(2015),i(3716)),j=i.n(_),b=i(6223),k=i(5989),w=i(5346),C=i(7449),I=i(7343),S=i(4116),A=i(4117),N=i(6230),P=i(7821),D=i(3804),E=i(4443),R=i.n(E),H=i(1021),T=i(270),M=i(579);const Y="https://ik.imagekit.io/hotelzifyprod/assets/images/off.svg",z="https://ik.imagekit.io/hotelzifyprod/assets/images/on.svg",B="https://ik.imagekit.io/hotelzifyprod/assets/images/user.svg",F="https://ik.imagekit.io/hotelzifyprod/assets/images/Confirmed.svg";t().extend(R());const O=o=>{var e,i,n,_,E,R,O,L,G,q,W,U,V,K,J,Z,X,$,Q,oo,eo,io,lo,no,to,ao,so,ro,co,uo,vo,mo,po,ho,go,yo,fo,xo,_o,jo,bo,ko;let{location:wo}=o;const[Co,Io]=(0,d.useState)(),[So,Ao]=(0,d.useState)(0),[,No]=(0,d.useState)(0),[Po,Do]=(0,d.useState)(),[Eo,Ro]=(0,d.useState)(0),[Ho,To]=(0,d.useState)(0),[Mo,Yo]=(0,d.useState)(),[zo,Bo]=(0,d.useState)(!1),[Fo,Oo]=(0,d.useState)(),[Lo,Go]=(0,d.useState)(!1),[qo,Wo]=(0,d.useState)(),[Uo,Vo]=(0,d.useState)(),[,Ko]=(0,d.useState)(),[Jo,Zo]=(0,d.useState)(),[Xo,$o]=(0,d.useState)("PartialPayment"),[Qo,oe]=(0,d.useState)([]),[ee,ie]=(0,d.useState)([]),[le,ne]=(0,d.useState)(),[te,de]=(0,d.useState)([]),[ae,se]=(0,d.useState)(!1),[re,ce]=(0,d.useState)(),[ue,ve]=(0,d.useState)(!1),[me,pe]=(0,d.useState)(),[he,ge]=(0,d.useState)(!1),[ye,fe]=(0,d.useState)(!1),[xe,_e]=(0,d.useState)(),[je,be]=(0,d.useState)({}),[ke,we]=(0,d.useState)(),[Ce,Ie]=(0,d.useState)([]),[Se,Ae]=(0,d.useState)("rzp_live_1V5wz8nlIYcRkn"),[Ne,Pe]=(0,d.useState)(!1),[De,Ee]=(0,d.useState)(!1),[Re,He]=(0,d.useState)(!1),[Te,Me]=(0,d.useState)(!1),{fetching:Ye,policies:ze,paymentProvider:Be,hotelData:Fe,bookingEngineConfig:Oe,bookingEngineConfigLoading:Le}=(0,s.d4)(o=>o.hotelInfo),Ge=(0,T.N)(null===Fe||void 0===Fe?void 0:Fe.country);(0,d.useEffect)(()=>{(0,C.A6)()},[]),(0,d.useEffect)(()=>{(null!==Fe&&void 0!==Fe&&Fe.id||null!==Co&&void 0!==Co&&Co.hotelId)&&!Le&&(0,S.i)(Oe,Fe,Co)},[Co,Fe,Oe,Le]),(0,d.useEffect)(()=>{Be&&(async()=>
1{"razorpay"===(null===Be||void 0===Be?void 0:Be.vendor)&&Ae(null===Be||void 0===Be?void 0:Be.vendorKey)})()},[Be]);const qe=(0,s.wA)();(0,d.useEffect)(()=>{const o=document.createElement("script");return o.src="https://checkout.razorpay.com/v1/checkout.js",o.async=!0,document.body.appendChild(o),()=>{document.body.removeChild(o)}},[]),(0,d.useEffect)(()=>{var o;null!==Co&&void 0!==Co&&null!==(o=Co.Hotel)&&void 0!==o&&o.chainId&&(0,I.T3)(Co.Hotel.chainId)},[null===Co||void 0===Co||null===(e=Co.Hotel)||void 0===e?void 0:e.chainId]);const{t:We}=(0,A.Bd)();(0,d.useEffect)(()=>{window.scrollTo(0,0),localStorage.removeItem("userHistory")},[]),(0,d.useEffect)(()=>{(async()=>{var o,e,i;k.A.remove("viewed"),k.A.remove("isApiCalled"),k.A.remove("bookingObj");const l={id:wo.match.params.bookingId};qe({type:h.A.FETCHING,payload:!0}),console.log("Printing bookingID which is passed as an argument to call searchApi function with bookingId as its argument",l);const n=await(0,y.PG)(l);if([455880,457158,457159,457161,457162,457164,457166,457167,457593,457820,458030,458156,458442,458489,461776,462372,463106,463333,463776,464356,465033,465203,465495,465702,465838].includes(n.data[0].id)){var t,d;const o=null===n||void 0===n||null===(t=n.data[0])||void 0===t||null===(d=t.Hotel)||void 0===d?void 0:d.websiteSlug;return void(window.location.href="".concat(window.location.origin,"/").concat(o))}console.log("This is the response we got when we called searchAPI function with ",n);const a=await(0,y.Eh)(n.data[0].id);if(ne((null===a||void 0===a?void 0:a.data)||[]),Io(n.data[0]),null!==(o=n.data[0])&&void 0!==o&&o.Hotel&&qe({type:h.A.DETAILS,payload:n.data[0].Hotel}),(null===wo||void 0===wo||null===(e=wo.location)||void 0===e||null===(i=e.search)||void 0===i?void 0:i.length)>0){var s;let o=null===wo||void 0===wo||null===(s=wo.location)||void 0===s?void 0:s.search;Bo((null===o||void 0===o?void 0:o.length)>3)}qe({type:h.A.FETCHING,payload:!1})})()},[wo.match.params.bookingId]),(0,d.useEffect)(()=>{try{(JSON.parse(localStorage.getItem("visited"))||[]).length>0&&localStorage.removeItem("visited")}catch(o){(0,w.fireGtmEvent)("local_storage_failed",{error:o})}},[]),(0,d.useEffect)(()=>{if(Co){let o=0,e=0,i=0,l=0,n=0,t=0,d=[];const{BookingItems:a=[],currency:s="INR"}=Co;a.filter(o=>{var e;return"room_addon"===(null===o||void 0===o?void 0:o.itemType)&&"meal"===(null===o||void 0===o||null===(e=o.Addon)||void 0===e?void 0:e.category)}).forEach(d=>{var a,s,r;"Breakfast"===(null===d||void 0===d||null===(a=d.Addon)||void 0===a?void 0:a.name)?(o+=parseInt(null===d||void 0===d?void 0:d.quantity),l+=parseInt(null===d||void 0===d?void 0:d.totalAmount)):"Dinner"===(null===d||void 0===d||null===(s=d.Addon)||void 0===s?void 0:s.name)?(i+=parseInt(null===d||void 0===d?void 0:d.quantity),t+=parseInt(null===d||void 0===d?void 0:d.totalAmount)):"Lunch"===(null===d||void 0===d||null===(r=d.Addon)||void 0===r?void 0:r.name)&&(e+=parseInt(null===d||void 0===d?void 0:d.quantity),n+=parseInt(null===d||void 0===d?void 0:d.totalAmount))}),o&&d.push({name:"Breakfast",quantity:o,price:l,currency:s}),e&&d.push({name:"Lunch",quantity:e,price:n,currency:s}),i&&d.push({name:"Dinner",quantity:i,price:t,currency:s}),ie(d)}},[Co]),(0,d.useEffect)(()=>{if(Co){const o=new Map,e=new Map,{BookingItems:i=[]}=Co;i.forEach(i=>{var l,n=0;if("room"===(null===i||void 0===i?void 0:i.itemType)||"hourly_room"===(null===i||void 0===i?void 0:i.itemType)){const{hourly:o=[]}=i;let e=(null===o||void 0===o?void 0:o.filter(o=>(null===o||void 0===o?void 0:o.id)===(null===i||void 0===i?void 0:i.roomSlotId))[0])||{};ce(null===e||void 0===e?void 0:e.hour)}if("room"===(null===i||void 0===i?void 0:i.itemType)||"hourly_room"===(null===i||void 0===i?void 0:i.itemType)||"room_addon"===(null===i||void 0===i?void 0:i.itemType)&&"person"===(null===i||void 0===i||null===(l=i.Addon)||void 0===l?void 0:l.category))if(n+=parseFloat(null===i||void 0===i?void 0:i.originalAmount),o.has(null===i||void 0===i?void 0:i.hotelRoomId)){let e=parseFloat(o.get(null===i||void 0===i?void 0:i.hotelRoomId));e+=n,o.set(null===i||void 0===i?void 0:i.hotelRoomId,e)}else o.set(null===i||void 0===i?void 0:i.hotelRoomId,n);if("room"===(null===i||void 0===i?void 0:i.itemType)||"hourly_room"===(null===i||void 0===i?void 0:i.itemType))if(e.has(null===i||void 0===i?void 0:i.hotelRoomId)
1){let o=e.get(null===i||void 0===i?void 0:i.hotelRoomId);o++,e.set(null===i||void 0===i?void 0:i.hotelRoomId,o)}else e.set(null===i||void 0===i?void 0:i.hotelRoomId,1)}),Wo(o),Vo(e)}},[Co]),(0,d.useEffect)(()=>{if(Uo){const{BookingItems:e=[]}=Co;let i=[];for(let[n,t]of Uo){var o;let d=null===e||void 0===e?void 0:e.filter(o=>("room"===(null===o||void 0===o?void 0:o.itemType)||"hourly_room"===(null===o||void 0===o?void 0:o.itemType))&&(null===o||void 0===o?void 0:o.hotelRoomId)===n)[0],a=0;null===e||void 0===e||null===(o=e.filter(o=>("room"===(null===o||void 0===o?void 0:o.itemType)||"hourly_room"===(null===o||void 0===o?void 0:o.itemType))&&(null===o||void 0===o?void 0:o.hotelRoomId)===n))||void 0===o||o.forEach(o=>{a=a+(null===o||void 0===o?void 0:o.adultCount)+(null===o||void 0===o?void 0:o.childCount)+(null===o||void 0===o?void 0:o.infantCount)+(null===o||void 0===o?void 0:o.guests)}),d=(0,l.A)((0,l.A)({},d),{},{quantity:t,totalGuests:a}),i.push(d)}oe(i)}},[Uo,Co]),(0,d.useEffect)(()=>{if(qo){var o;let e=0;for(let[,o]of qo){let i=0;i=o>8400?o-o/1.18:o-o/1.12,e+=i}e*=null===Co||void 0===Co?void 0:Co.BookingItems[0].days,Ko(Number(e).toFixed((0,I.S2)(null===Co||void 0===Co||null===(o=Co.Hotel)||void 0===o?void 0:o.currency)))}},[qo]),(0,d.useEffect)(()=>{if(null!==Co&&void 0!==Co&&Co.newAmount){let o=!(null===Co||void 0===Co||!Co.newAmount||"booked"!==(null===Co||void 0===Co?void 0:Co.status)||(null===Co||void 0===Co?void 0:Co.newAmount)===(null===Co||void 0===Co?void 0:Co.totalAmount));Go(o)}},[Co]),(0,d.useEffect)(()=>{if((null===ze||void 0===ze?void 0:ze.length)>0){let o=null===ze||void 0===ze?void 0:ze.filter(o=>"checkin_checkout"===(null===o||void 0===o?void 0:o.uiType))[0];Oo(o)}},[ze]),(0,d.useEffect)(()=>{var o,e;let i;const l=null===wo||void 0===wo||null===(o=wo.match)||void 0===o||null===(e=o.params)||void 0===e?void 0:e.bookingId;return zo&&"pending"===(null===Co||void 0===Co?void 0:Co.status)&&l&&(i=setTimeout(async()=>{try{var o;const e=await(0,y.PG)({id:l}),i=null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o[0];i&&["booked","confirmed_by_owner"].includes(i.status)&&Io(i)}catch(e){console.log("Error checking pending booking confirmation",e)}},2500)),()=>clearTimeout(i)},[zo,null===Co||void 0===Co?void 0:Co.status,null===wo||void 0===wo||null===(i=wo.match)||void 0===i||null===(n=i.params)||void 0===n?void 0:n.bookingId]),(0,d.useEffect)(()=>{console.log("Entered useEffect which calls pushtoTagManager");const o=["booked","confirmed_by_owner"].includes(null===Co||void 0===Co?void 0:Co.status);zo&&o&&(console.log("If isRedirected is true and status is booked/confirmed PushToTagManager will get triggered"),Ue()),console.log("Exited useEffect which calls pushtoTagManager")},[zo,null===Co||void 0===Co?void 0:Co.status]),(0,d.useEffect)(()=>{if(Co){var o;const e=null===(o=Co.payments)||void 0===o?void 0:o.some(o=>"BNPL"===o.gateway);Ee(e&&Eo+Ho===0&&["pending","booked","confirmed_by_owner"].includes(null===Co||void 0===Co?void 0:Co.status)),He(!1)}},[Co,Eo,Ho]);const Ue=()=>{var o,e,i,l,n,d,a,s,r,c,u,v,m,p,h,y,f,x;console.log("Inside pushToTagManager function declaration");if(!["booked","confirmed_by_owner"].includes(null===Co||void 0===Co?void 0:Co.status))return void console.log("pushToTagManager: booking is not confirmed yet (status:",null===Co||void 0===Co?void 0:Co.status,") - skipping tag manager push");if(!(null===Co||void 0===Co||!Co.createdDt||t()().diff(t()(Co.createdDt),"hour")<24))return void console.log("pushToTagManager: historical booking - skipping conversion");const _=[null===Co||void 0===Co?void 0:Co.id,null===Co||void 0===Co?void 0:Co.bookingId,null===Co||void 0===Co?void 0:Co.publicId,null===wo||void 0===wo||null===(o=wo.match)||void 0===o||null===(e=o.params)||void 0===e?void 0:e.bookingId,null===wo||void 0===wo||null===(i=wo.match)||void 0===i||null===(l=i.params)||void 0===l?void 0:l.id].filter(Boolean);if(_.some(o=>{try{return!!localStorage.getItem("ga4_purchase_tracked_".concat(o))}catch(e){return!1}}))return void console.log("pushToTagManager: purchase already tracked - skipping");_.forEach(o=>{try{localStorage.setItem("ga4_purchase_tracked_".concat(o),"1")}catch(e){}}),window.dataLayer=window.dataLayer||[];const j=k.A.get("source")||(null===Co||void 0===Co?void 0:Co.source)||"Direct",b=null!==(n=null!==(d=null===Co||void 0===Co||null===(a=Co.Hotel)||void 0===a?void 0:a.chainId)&&void 0!==d?d:k.A.get("chainId"))&&void 0!==n?n:"",C=null!==(s=null!==(r=null===Co||void 0===Co||null===(c=Co.Hotel)||void 0===c?void 0:c.name)&&void 0!==r?r:k.A.get("hotelName"))&&void 0!==s?s:"",S=null!==(u=null!==(v=null===Co||void 0===Co||null===(m=Co.Hotel)||void 0===m?void 0:m.id)&&void 0!==v?v:k.A.get("hotelId"))&&void 0!==u?u:"";if(window&&I.Rm){var A,N,P,D,E,R,H,T,M,Y,z,B,F,O,L,G,q,W;(0,w.pushDataLayerEvent)({event:"conversionAnalytics",chain_id:String(b||""),chainId:b?Number(b):null,hotel_id:String(S||""),hotelId:S?Number(S):null,hotel_name:String(C||""),hotelName:String(C||""),booking_source:j,value:parseFloat((null===Co||void 0===Co?void 0:Co.totalAmount)||0),currency:(null===Co||void 0===Co||null===(A=Co.Hotel)||void 0===A?void 0:A.currency)||"INR",transaction_id:(null===Co||void 0===Co?void 0:Co.id)||wo.match.params.bookingId,source:j,utm_source:(null===(N=k.A.get("utmObj"))||void 0===N?void 0:N.utmSource)||null,utm_campaign:(null===(P=k.A.get("utmObj"))||void 0===P?void 0:P.utmCampaign)||null,items:[{id:"".concat(null===Co||void 0===Co||null===(D=Co.Hotel)||void 0===D?void 0:D.id),item_id:"".concat(null===Co||void 0===Co||null===(E=Co.Hotel)||void 0===E?void 0:E.id),item_name:(null===Co||void 0===Co||null===(R=Co.Hotel)||void 0===R?void 0:R.name)||"Hotel Room",item_category:String(b||""),start_date:t()(null===Co||void 0===Co?void 0:Co.checkInDate).format("YYYY-MM-DD"),end_date:t()(null===Co||void 0===Co?void 0:Co.checkOutDate).format("YYYY-MM-DD")}]},null===Co||void 0===Co||null===(H=Co.Hotel)||void 0===H?void 0:H.chainId),(0,w.pushDataLayerEvent)({event:"purchase",chain_id:String(b||""),chainId:b?Number(b):null,hotel_id:String(S||""),hotelId:S?Number(S):null,hotel_name:String(C||""),hotelName:String(C||""),booking_source:j,value:parseFloat((null===Co||void 0===Co?void 0:Co.totalAmount)||0),currency:(null===Co||void 0===Co||null===(T=Co.Hotel)||void 0===T?void 0:T.currency)||"INR",transaction_id:(null===Co||void 0===Co?void 0:Co.id)||wo.match.params.bookingId,source:j,utm_source:(null===(M=k.A.get("utmObj"))||void 0===M?void 0:M.utmSource)||null,utm_campaign:(null===(Y=k.A.get("utmObj"))||void 0===Y?void 0:Y.utmCampaign)||null,items:[{id:"".concat(null===Co||void 0===Co||null===(z=Co.Hotel)||void 0===z?void 0:z.id),item_id:"".concat(null===Co||void 0===Co||null===(B=Co.Hotel)||void 0===B?void 0:B.id),item_name:(null===Co||void 0===Co||null===(F=Co.Hotel)||void 0===F?void 0:F.name)||"Hotel Room",item_category:String(b||""),start_date:t()(null===Co||void 0===Co?void 0:Co.checkInDate).format("YYYY-MM-DD"),end_date:t()(null===Co||void 0===Co?void 0:Co.checkOutDate).format("YYYY-MM-DD")}]},null===Co||void 0===Co||null===(O=Co.Hotel)||void 0===O?void 0:O.chainId);try{var U,V,K,J,Z,X,$,Q,oo,eo,io,lo,no,to,ao;let o=(null===Co||void 0===Co?void 0:Co.mobile)||"";try{const e=(0,g.parsePhoneNumber)(String(null===Co||void 0===Co?void 0:Co.mobile));o=e.countryCallingCode+e.nationalNumber.replace(/\s+/g,"")}catch(xo){o=String((null===Co||void 0===Co?void 0:Co.mobile)||"").replace(/[^0-9]/g,"")}(0,w.pushDataLayerEvent)({event:"product_purchase",chain_id:String(b||""),chainId:b?Number(b):null,hotel_id:String(S||""),hotelId:S?Number(S):null,hotel_name:String(C||""),hotelName:String(C||""),booking_source:j,value:parseFloat((null===Co||void 0===Co?void 0:Co.totalAmount)||0),currency:(null===Co||void 0===Co||null===(U=Co.Hotel)||void 0===U?void 0:U.currency)||"INR",transaction_id:(null===Co||void 0===Co?void 0:Co.id)||wo.match.params.bookingId,source:j,utm_source:(null===(V=k.A.get("utmObj"))||void 0===V?void 0:V.utmSource)||null,utm_campaign:(null===(K=k.A.get("utmObj"))||void 0===K?void 0:K.utmCampaign)||null,items:[{id:"".concat(null===Co||void 0===Co||null===(J=Co.Hotel)||void 0===J?void 0:J.id),item_id:"".concat(null===Co||void 0===Co||null===(Z=Co.Hotel)||void 0===Z?void 0:Z.id),item_name:(null===Co||void 0===Co||null===(X=Co.Hotel)||void 0===X?void 0:X.name)||"Hotel Room",item_category:String(b||""),start_date:t()(null===Co||void 0===Co?void 0:Co.checkInDate).format("YYYY-MM-DD HH:mm:ss"),end_date:t()(null===Co||void 0===Co?void 0:Co.checkOutDate).format("YYYY-MM-DD HH:mm:ss")}],resort:(null===Co||void 0===Co||null===($=Co.Hotel)||void 0===$?void 0:$.name)||"",checkin:null!==Co&&void 0!==Co&&Co.checkInDate?t()(Co.checkInDate).format("YYYY-MM-DD HH:mm:ss"):"",checkout:null!==Co&&void 0!==Co&&Co.checkOutDate?t()(Co.checkOutDate).format("YYYY-MM-DD HH:mm:ss"):"",adult_guests:null!==(Q=null===Co||void 0===Co?void 0:Co.adultCount)&&void 0!==Q?Q:0,children_guests:null!==(oo=null===Co||void 0===Co?void 0:Co.childCount)&&void 0!==oo?oo:0,infant_guests:null!==(eo=null===Co||void 0===Co?void 0:Co.infantCount)&&void 0!==eo?eo:0,number_of_nights:null!==Co&&void 0!==Co&&Co.checkInDate&&null!==Co&&void 0!==Co&&Co.checkOutDate?t()(Co.checkOutDate).diff(t()(Co.checkInDate),"day"):0,number_of_rooms:So||0,promotion_applied:(null===Co||void 0===Co?void 0:Co.coupon)||((null===Co||void 0===Co?void 0:Co.totalDiscountAmount)>0?null===Co||void 0===Co?void 0:Co.totalDiscountAmount:"")||"",totalprice:parseFloat((null===Co||void 0===Co?void 0:Co.totalAmount)||0),page_url:"undefined"!==typeof window?null===(io=window.location)||void 0===io?void 0:io.href:"",resort_banner:(null===Co||void 0===Co||null===(lo=Co.Hotel)||void 0===lo||null===(no=lo.HotelImages)||void 0===no||null===(to=no[0])||void 0===to?void 0:to.cdnImageUrl)||"",mobile:o||"",email:(null===Co||void 0===Co?void 0:Co.email)||"",salutation:"Male"===(null===Co||void 0===Co?void 0:Co.gender)?"Mr":"Female"===(null===Co||void 0===Co?void 0:Co.gender)?"Ms":(null===Co||void 0===Co?void 0:Co.gender)||"",name:(null===Co||void 0===Co?void 0:Co.name)||"",special_requests:(null===Co||void 0===Co?void 0:Co.requests)||"",gst_invoice:(null===Co||void 0===Co?void 0:Co.taxDetails)||0,mode_of_payment:Mo||""},null===Co||void 0===Co||null===(ao=Co.Hotel)||void 0===ao?void 0:ao.chainId)}catch(_o){console.error("Analytics tracking error (product_purchase):",_o)}if((0,w.pixelConversion)({value:parseFloat((null===Co||void 0===Co?void 0:Co.totalAmount)||0),currency:(null===Co||void 0===Co||null===(L=Co.Hotel)||void 0===L?void 0:L.currency)||"INR",transaction_id:(null===Co||void 0===Co?void 0:Co.id)||wo.match.params.bookingId,items:[{id:"".concat(null===Co||void 0===Co||null===(G=Co.Hotel)||void 0===G?void 0:G.id),start_date:t()(null===Co||void 0===Co?void 0:Co.checkInDate).format("YYYY-MM-DD"),end_date:t()(null===Co||void 0===Co?void 0:Co.checkOutDate).format("YYYY-MM-DD")}]}),(0,w.trackBookingSuccess)({orderStatus:Co,amountPaid:null===Co||void 0===Co?void 0:Co.totalAmount,rooms:(null===Co||void 0===Co||null===(q=Co.BookingItems)||void 0===q?void 0:q.filter(o=>"room"===(null===o||void 0===o?void 0:o.itemType)||"hourly_room"===(null===o||void 0===o?void 0:o.itemType)))||[]}),(null===Co||void 0===Co||null===(W=Co.Hotel)||void 0===W?void 0:W.chainId)===I.CV)try{"undefined"!==typeof window&&"function"===typeof window.createPushLapSale?(window.createPushLapSale({userId:String((null===Co||void 0===Co?void 0:Co.id)||""),amount:(null===Co||void 0===Co?void 0:Co.totalAmount)||0,name:(null===Co||void 0===Co?void 0:Co.name)||"",email:(null===Co||void 0===Co?void 0:Co.email)||""}),console.log("[PushLap] createPushLapSale called:",{userId:String((null===Co||void 0===Co?void 0:Co.id)||""),amount:(null===Co||void 0===Co?void 0:Co.totalAmount)||0,name:(null===Co||void 0===Co?void 0:Co.name)||"",email:(null===Co||void 0===Co?void 0:Co.email)||""})):console.log("[PushLap] createPushLapSale function not available")}catch(jo){console.error("[PushLap] Error calling createPushLapSale:",jo)}}var so,ro,co,uo,vo,mo,po;[1,76].includes(null===Co||void 0===Co||null===(p=Co.Hotel)||void 0===p?void 0:p.chainId)&&"undefined"!==typeof window&&I.Rm&&window.gtag("event","conversion",{send_to:"AW-11024745253/aKXnCOnr-ZkYEKWGgYkp",value:null===Co||void 0===Co?void 0:Co.totalAmount,currency:(null===Co||void 0===Co||null===(so=Co.Hotel)||void 0===so?void 0:so.currency)||"INR",transaction_id:(null===Co||void 0===Co?void 0:Co.id)||wo.match.params.bookingId,items:[{id:"".concat(null===Co||void 0===Co||null===(ro=Co.Hotel)||void 0===ro?void 0:ro.id),item_id:"".concat(null===Co||void 0===Co||null===(co=Co.Hotel)||void 0===co?void 0:co.id),item_name:(null===Co||void 0===Co||null===(uo=Co.Hotel)||void 0===uo?void 0:uo.name)||"Hotel Room",item_category:String((null===Co||void 0===Co||null===(vo=Co.Hotel)||void 0===vo?void 0:vo.chainId)||""),start_date:t()(null===Co||void 0===Co?void 0:Co.checkInDate).format("YYYY-MM-DD"),end_date:t()(null===Co||void 0===Co?void 0:Co.checkOutDate).format("YYYY-MM-DD")}]});("undefined"!==typeof window&&window.gtag&&window.gtag("event","conversion",{send_to:"AW-11452557213/v1YoCOmjnvcbEJ3PgNUq",value:null===Co||void 0===Co?void 0:Co.totalAmount,currency:(null===Co||void 0===Co||null===(h=Co.Hotel)||void 0===h?void 0:h.currency)||"INR",transaction_id:(null===Co||void 0===Co?void 0:Co.id)||(null===wo||void 0===wo||null===(y=wo.match)||void 0===y||null===(f=y.params)||void 0===f?void 0:f.bookingId)}
1),23===(null===Fe||void 0===Fe?void 0:Fe.chainId))&&("undefined"!==typeof window&&I.Rm&&window.gtag("event","conversion",{send_to:"AW-10888201272",value:null===Co||void 0===Co?void 0:Co.totalAmount,currency:(null===Co||void 0===Co||null===(mo=Co.Hotel)||void 0===mo?void 0:mo.currency)||"INR",transaction_id:(null===Co||void 0===Co?void 0:Co.id)||wo.match.params.bookingId,items:[{id:"".concat(null===Co||void 0===Co||null===(po=Co.Hotel)||void 0===po?void 0:po.id),start_date:t()(null===Co||void 0===Co?void 0:Co.checkInDate).format("YYYY-MM-DD"),end_date:t()(null===Co||void 0===Co?void 0:Co.checkOutDate).format("YYYY-MM-DD")}]}));if(null!==Oe&&void 0!==Oe&&null!==(x=Oe.googlePixel)&&void 0!==x&&x.googleAdsId){var ho,go,yo,fo;const o=null===Oe||void 0===Oe||null===(ho=Oe.googlePixel)||void 0===ho||null===(go=ho.googleAdsConversions)||void 0===go?void 0:go.purchase,e=o?"".concat(Oe.googlePixel.googleAdsId,"/").concat(o):"".concat(Oe.googlePixel.googleAdsId);"undefined"!==typeof window&&I.Rm&&window.gtag&&window.gtag("event","conversion",{send_to:e,value:null===Co||void 0===Co?void 0:Co.totalAmount,currency:(null===Co||void 0===Co||null===(yo=Co.Hotel)||void 0===yo?void 0:yo.currency)||"INR",transaction_id:(null===Co||void 0===Co?void 0:Co.id)||wo.match.params.bookingId,items:[{id:"".concat(null===Co||void 0===Co||null===(fo=Co.Hotel)||void 0===fo?void 0:fo.id),start_date:t()(null===Co||void 0===Co?void 0:Co.checkInDate).format("YYYY-MM-DD"),end_date:t()(null===Co||void 0===Co?void 0:Co.checkOutDate).format("YYYY-MM-DD")}]})}return!1},Ve=k.A.get("lang")||"en";(0,d.useEffect)(()=>{null!==Co&&void 0!==Co&&Co.hotelId&&(qe((0,p.BU)(null===Co||void 0===Co?void 0:Co.hotelId,Ve)),qe((0,p.ix)(null===Co||void 0===Co?void 0:Co.hotelId)),qe((0,p.en)(null===Co||void 0===Co?void 0:Co.hotelId)))},[Co]),(0,d.useEffect)(()=>
1{Be&&"paidyet"===(null===Be||void 0===Be?void 0:Be.vendor)&&$o("VCC")},[Be]),(0,d.useEffect)(()=>{var o,e,i=0,l=0;null===Co||void 0===Co||Co.BookingItems.forEach(o=>{"room"!==(null===o||void 0===o?void 0:o.itemType)&&"hourly_room"!==(null===o||void 0===o?void 0:o.itemType)||(i+=null===o||void 0===o?void 0:o.quantity),"room"!==(null===o||void 0===o?void 0:o.itemType)&&"room_addon"!==(null===o||void 0===o?void 0:o.itemType)&&"hourly_room"!==(null===o||void 0===o?void 0:o.itemType)||(l+=parseFloat(null===o||void 0===o?void 0:o.originalAmount))}),Ao(i),No(Number(l).toFixed((0,I.S2)(null===Co||void 0===Co||null===(o=Co.Hotel)||void 0===o?void 0:o.currency)));let n=0,t=0;null===Co||void 0===Co||null===(e=Co.payments)||void 0===e||e.forEach(o=>{"razorpay"===(null===o||void 0===o?void 0:o.gateway)&&"completed"===(null===o||void 0===o?void 0:o.status)&&(n+=parseFloat(null===o||void 0===o?void 0:o.amountPaid),Yo(null===o||void 0===o?void 0:o.gateway)),"VOUCHER"===(null===o||void 0===o?void 0:o.gateway)&&"completed"===(null===o||void 0===o?void 0:o.status)&&(t+=parseFloat(null===o||void 0===o?void 0:o.amountPaid))}),Ro(n),To(t)},[Co]);const Ke=async o=>{let e={bookingId:null===Co||void 0===Co?void 0:Co.id,acceptance:!!o};await(0,y.Jy)(e),window.location.reload()},Je=o=>{$o(o)},Ze=async(o,e)=>{try{await(0,y.C8)(e)}catch(i){(0,w.fireGtmEvent)("error",{name:"orderSuccessFailed"})}};(0,d.useEffect)(()=>{var o,e;"prepayment"===(null===wo||void 0===wo||null===(o=wo.location)||void 0===o||null===(e=o.search)||void 0===e?void 0:e.slice(1))&&Zo(!0)},[]),(0,d.useEffect)(()=>{const o=document.createElement("script");return o.src="https://cdn.paidyet.com/paynowv3.js",o.async=!0,o.onload=()=>Pe(!0),document.body.appendChild(o),()=>document.body.removeChild(o)},[]);const Xe=async()=>{const o={bookingId:null===Co||void 0===Co?void 0:Co.id,gateway:Xo,vendor:null===Be||void 0===Be?void 0:Be.vend
1or,superVendor:null===Be||void 0===Be?void 0:Be.superVendor,partialAmount:(null===Co||void 0===Co?void 0:Co.commissionAmount)||0},e=await(0,y.zr)(o);200===(null===e||void 0===e?void 0:e.status)?"paidyet"===(null===Be||void 0===Be?void 0:Be.vendor)&&window.PaidYET?(o=>{window.PaidYET.processPayment(function(e){var i,l;if(null!==e&&void 0!==e&&e.success){var n;const i={gateway:"razorpay",paymentId:null===o||void 0===o||null===(n=o.payment)||void 0===n?void 0:n.id,paidyetToken:null===e||void 0===e?void 0:e.token,vendor:"paidyet",hotelId:null===Co||void 0===Co?void 0:Co.hotelId};Ze(0,i)}else((null===e||void 0===e||null===(i=e.error)||void 0===i?void 0:i.length)>0||(null===e||void 0===e||null===(l=e.message)||void 0===l?void 0:l.length)>0)&&j().error((null===e||void 0===e?void 0:e.error)||(null===e||void 0===e?void 0:e.message))})})(null===e||void 0===e?void 0:e.data):"paytring"===(null===Be||void 0===Be?void 0:Be.superVendor)?(0,I.dc)(null===e||void 0===e?void 0:e.data,null===Co||void 0===Co?void 0:Co.hotelId,Be,Ze):(o=>{var e,i,l;const{order:n,payment:t}=o;var d={key:Se,amount:n.amount,currency:n.currency,name:null===Co||void 0===Co||null===(e=Co.Hotel)||void 0===e?void 0:e.name,description:"Paying ".concat(null===Co||void 0===Co||null===(i=Co.Hotel)||void 0===i?void 0:i.name),image:"".concat(null===Co||void 0===Co||null===(l=Co.Hotel)||void 0===l?void 0:l.logo,"?tr=w-1080,h-920")||0,order_id:n.id,handler:async function(o){var e;const i={gateway:"razorpay",paymentId:t.id,razorpayOrderId:o.razorpay_order_id,razorpayPaymentId:o.razorpay_payment_id,razorpaySignature:o.razorpay_signature,hotelId:null===Co||void 0===Co||null===(e=Co.Hotel)||void 0===e?void 0:e.id};await(0,y.C8)(i)},prefill:{name:null===Co||void 0===Co?void 0:Co.name,email:null===Co||void 0===Co?void 0:Co.email,contact:null===Co||void 0===Co?void 0:Co.mobile},notes:{address:"Hotelzify Corporate Office"},theme:{color:"#e73c00"},modal:{ondismiss:function(){}}},a=new window.Razorpay(d);a.open(),a.on("payment.failed",function(o){console.log(o.error.code),console.log(o.error.description),console.log(o.error.source),console.log(o.error.step),console.log(o.error.reason),console.log(o.error.metadata.order_id),console.log(o.error.metadata.payment_id)})})(e.data,null===Co||void 0===Co||Co.id):j().error(null===e||void 0===e?void 0:e.error)};(0,d.useMemo)(()=>function(o){let{orderStatus:e}=o;if(null===e||void 0===e||!e.checkInDate||null===e||void 0===e||!e.checkInTime)return"2 hours";const i=new Date("".concat(e.checkInDate,"T").concat(e.checkInTime));return(0,H.c)(i,new Date)>2?"6 hours":"2 hours"}({orderStatus:Co}),[Co]);const $e=["[email protected]","[email protected]","[email protected]","[email protected]","[email protected]"],Qe=null===Co||void 0===Co||null===(_=Co.Hotel)||void 0===_?void 0:_.userId;return Ye||Le?(0,M.jsx)(u.A,{}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(a.m,{children:[(0,M.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,M.jsx)("meta",{name:"googlebot",content:"noindex,nofollow"}),(0,M.jsx)("title",{children:"".concat(null===Co||void 0===Co||null===(E=Co.Hotel)||void 0===E?void 0:E.name," - Book on our official website for best price & service.")})]}),(0,M.jsxs)("div",{className:"paymentStatus",children:[null!==(null===Co||void 0===Co||null===(R=Co.Hotel)||void 0===R?void 0:R.whatsappNumber)&&(0,M.jsx)("div",{className:"landingPage__description",style:{margin:0,padding:0},children:(0,M.jsx)("a",{target:"_blank",rel:"noreferrer",href:"https://wa.me/".concat(null===Co||void 0===Co||null===(O=Co.Hotel)||void 0===O?void 0:O.whatsappDial).concat(null===Co||void 0===Co||null===(L=Co.Hotel)||void 0===L?void 0:L.whatsappNumber,"?text=Hello%20").concat(null===Co||void 0===Co||null===(G=Co.Hotel)||void 0===G?void 0:G.name,"%20I booked your property through hotelzify"),onClick:()=>(async()=>{var o;let e=k.A.get("source"),i=k.A.get("utmObj")||{},n=(0,l.A)({source:e},i);await(0,y.Yy)(null===Co||void 0===Co||null===(o=Co.Hotel)||void 0===o?void 0:o.id,n)})(),children:(0,M.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/whatsapp-logo-4456%20(1)_Cj-R_s4dB.png",alt:(null===Co||void 0===Co||null===(q=Co.Hotel)||void 0===q?void 0:q.name)+" whatsapp contact"})})}),(0,M.jsx)("header",{className:"paymentStatus__header",children:De?(0,M.jsxs)("div",{className:"booking-confirmation",children:[(0,M.jsxs)("div",{className:"booking-confirmation__header",children:[(0,M.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/assets/images/confirmed-green.svg",alt:"booking confirmed"}),(0,M.jsxs)("div",{children:[(0,M.jsx)("p",{className:"booking-confirmation__title",children:"Your Stay is Reserved! Complete Payment Before Arrival"}),(0,M.jsxs)("p",{children:["Pay ",(0,M.jsx)(f.A,{amount:Math.max(0,parseFloat((null===Co||void 0===Co?void 0:Co.totalAmount)-Eo-Ho))})," ","using any payment options before"," ",t()(null===Co||void 0===Co?void 0:Co.bnplCutoffDate).format("LLL")," to avoid auto cancellation."]})]})]}),(0,M.jsxs)("div",{className:"booking-confirmation__body",children:[(0,M.jsxs)("div",{className:"booking-confirmation__details",children:[(0,M.jsxs)("p",{children:["Booking ID: ",null===Co||void 0===Co?void 0:Co.id]}),(0,M.jsx)("p",{children:t()(null===Co||void 0===Co?void 0:Co.createdDt).format("lll")})]}),(0,M.jsx)("div",{onClick:()=>{window.location.href="/checkout/".concat(null===Co||void 0===Co?void 0:Co.id,"?Razorpay")},className:"booking-confirmation__pay-button",children:"Pay Now & Confirm"})]})]}):(0,M.jsxs)("div",{className:"paymentStatusBox",style:{background:"pending"===(null===Co||void 0===Co?void 0:Co.status)?"#3274d2":"rejected_by_owner"===(null===Co||void 0===Co?void 0:Co.status)||"cancelled_by_owner"===(null===Co||void 0===Co?void 0:Co.status)||"no_show"===(null===Co||void 0===Co?void 0:Co.status)?"linear-gradient(#E84451, #CC2936)":Lo?"linear-gradient(#DB9D47, #C37C18)":"linear-gradient(#6da34d, #50892e)"},children:[(0,M.jsxs)("div",{className:"paymentBoxTop",children:["rejected_by_owner"===(null===Co||void 0===Co?void 0:Co.status)||"cancelled_by_owner"===(null===Co||void 0===Co?void 0:Co.status)||"no_show"===(null===Co||void 0===Co?void 0:Co.status)?(0,M.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/assets/images/Rejected.svg",alt:"booking rejected"}):"booked"===(null===Co||void 0===Co?void 0:Co.status)?(0,M.jsx)("img",{src:F,alt:"booking confirmed"}):(0,M.jsx)("img",{src:F,alt:"booking confirmed",style:{visibility:"pe
1nding"===(null===Co||void 0===Co?void 0:Co.status)&&"hidden"}}),(0,M.jsxs)("div",{className:"paymentStatusBoxText",children:[(0,M.jsxs)("p",{children:[We("booking_id"),": ",null===Co||void 0===Co?void 0:Co.id]}),(0,M.jsx)("p",{children:t()(null===Co||void 0===Co?void 0:Co.createdDt).format("DD MMM YY hh:mm a")})]})]}),Lo?(0,M.jsx)("div",{className:"paymentBoxBottom",children:"booked"===(null===Co||void 0===Co?void 0:Co.status)&&(0,M.jsxs)(d.Fragment,{children:[(0,M.jsx)("h3",{}),(0,M.jsx)("span",{children:We("apology_incorrect_price")})]})}):(0,M.jsxs)("div",{className:"paymentBoxBottom",children:["booked"===(null===Co||void 0===Co?void 0:Co.status)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("h3",{children:We("booking_request_received")}),(0,M.jsxs)("span",{children:[We("check_inbox_spam_folder"),"."]})]}),"pending"===(null===Co||void 0===Co?void 0:Co.status)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("h3",{children:We("complete_booking")}),(0,M.jsx)("span",{children:We("waiting_to_host_your_stay")})]}),"confirmed_by_owner"===(null===Co||void 0===Co?void 0:Co.status)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("h3",{children:We("booking_confirmed")}),(0,M.jsx)("span",{children:We("enjoy_your_stay")})]}),"rejected_by_owner"===(null===Co||void 0===Co?void 0:Co.status)&&"Concurrency issue in CM"===(null===Co||void 0===Co?void 0:Co.reason)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("h3",{children:We("booking_rejected")}),(0,M.jsxs)("span",{children:["Sorry, room was just booked by another guest just moments before your payment was processed.",(0,M.jsx)("br",{}),(null===Co||void 0===Co?void 0:Co.amountPaid)>0&&"We truly apologize for this inconvenience. A full refund has already been initiated."]})]}),"rejected_by_owner"===(null===Co||void 0===Co?void 0:Co.status)&&"Concurrency issue in CM"!==(null===Co||void 0===Co?void 0:Co.reason)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("h3",{children:We("booking_rejected")}),"rejected_by_owner"===(null===Co||void 0===Co?void 0:Co.status)&&(0,M.jsxs)("span",{children:[We("stays_not_available"),"Pay At Hotel"!==(null===Co||void 0===Co?void 0:Co.paymentStatus)&&We("refund_initiated")]})]}),"no_show"===(null===Co||void 0===Co?void 0:Co.status)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("h3",{children:We("booking_cancelled")}),(0,M.jsx)("span",{children:We("your_reservation_has_been_marked_no_show_by_the_property")})]}),("cancelled_by_owner"===(null===Co||void 0===Co?void 0:Co.status)||"Cancelled by customer"===(null===Co||void 0===Co?void 0:Co.reason))&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("h3",{children:We("booking_cancelled")}),(0,M.jsxs)("span",{children:["Cancelled by customer"===(null===Co||void 0===Co?void 0:Co.reason)?We("booking_cancelled_message"):We("booking_cancelled_notification")," ","Pay At Hotel"!==(null===Co||void 0===Co?void 0:Co.paymentStatus)&&We("refund_initiated_notification")]})]})]})]})}),(0,M.jsxs)("div",{className:"paymentStatus__container2",children:[(0,M.jsx)("div",{className:"checkoutPage__selectedRoomsHeading",children:We("booking_details")}),(0,M.jsx)("div",{className:"paymentStatus__traveller",children:(0,M.jsxs)("div",{className:"travellerDetailes",style:{padding:"0 10px"},children:[(0,M.jsx)("h3",{children:null===Co||void 0===Co||null===(W=Co.Hotel)||void 0===W?void 0:W.name}),(0,M.jsx)("p",{children:null===Co||void 0===Co||null===(U=Co.Hotel)||void 0===U?void 0:U.address})]})}),"pending"!==(null===Co||void 0===Co?void 0:Co.status)&&(0,M.jsx)("div",{className:"paymentStatus__traveller",children:(0,M.jsxs)("div",{className:"travellerDetailes",style:{padding:"0 10px"},children:[(0,M.jsx)("h3",{children:We("contact_us")}),(0,M.jsxs)("a",{style:{color:"var(--primary-color)",display:"flex",fontSize:"16px",justifyContent:"flex-start",alignItems:"center",gap:"10px",padding:"12px 0",minHeight:"48px"},href:"tel:".concat(null===Co||void 0===Co||null===(V=Co.Hotel)||void 0===V?void 0:V.dialCode).concat(null===Co||void 0===Co||null===(K=Co.Hotel)||void 0===K?void 0:K.mobile),children:[(0,M.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/assets/images/phone.svg",alt:"hotel phone",width:"20px"})," ",null===Co||void 0===Co?void 0:Co.Hotel.dialCode," ",null===Co||void 0===Co?void 0:Co.Hotel.mobile]}),(null===Co||void 0===Co||null===(J=Co.Hotel)||void 0===J||null===(Z=J.email)||void 0===Z?void 0:Z.length)>0&&(null===Co||void 0===Co||null===(X=Co.Hotel)||void 0===X||null===($=X.email)||void 0===$||null===(Q=$.split(",").filter(o=>103376!==Qe&&104504!==Qe||!$e.includes(o)))||void 0===Q?void 0:Q.map((o,e)=>(0,M.jsxs)("a",{style:{color:"var(--primary-color)",fontSize:"16px",display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"10px",padding:"12px 0",minHeight:"48px"},href:"mailto:".concat(o),children:[(0,M.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/assets/images/mail.svg",alt:"hotel email",width:"20px"})," ",o]},e)))]})}),(0,M.jsxs)("div",{className:"paymentStatus__traveller",children:[(0,M.jsx)("div",{className:"checkoutPage__checkinLogo paymentColor",children:(0,M.jsx)("img",{src:B,alt:"user",width:"30px"})}),(0,M.jsxs)("div",{className:"travellerDetailes",children:[(0,M.jsx)("h3",{children:null===Co||void 0===Co?void 0:Co.name}),(0,M.jsx)("p",{children:null===Co||void 0===Co?void 0:Co.email})]})]}),(0,M.jsx)("div",{className:"checkoutPage__date ",children:(0,M.jsxs)("div",{className:"checkoutPage__checkin",children:[(0,M.jsx)("span",{className:"checkoutPage__checkinLogo paymentColor ",children:(0,M.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/assets/images/calendar.svg",alt:"calendar",width:"20px"})}),"hourly"===(null===Co||void 0===Co?void 0:Co.type)?(0,M.jsxs)("div",{className:"checkoutPage__checkinDetails",children:[(0,M.jsxs)("p",{children:[We("check_in")," ",(0,M.jsx)("b",{children:t()(null===Co||void 0===Co?void 0:Co.checkInDate).format("ddd, DD MMM'YY")})]}),(0,M.jsxs)("span",{children:[(0,I.KA)(null===Co||void 0===Co?void 0:Co.checkInTime)," -"," ",(0,I.KA)(null===Co||void 0===Co?void 0:Co.checkOutTime)," |"," ",(0,M.jsxs)("span",{style:{background:"rgba(50, 116, 210, 0.1)",padding:"3px",borderRadius:"3px"},children:[(null===Co||void 0===Co||null===(oo=Co.hourly)||void 0===oo?void 0:oo.length)>0&&(null===Co||void 0===Co||null===(eo=Co.hourly[0])||void 0===eo?void 0:eo.hour)," ",We("hour")]})]})]}):(0,M.jsxs)("div",{className:"checkoutPage__checkinDetails",children:[(0,M.jsxs)("p",{children:[We("check_in"),":"," ",(null===Fo||void 0===Fo||null===(io=Fo.HotelPolicies[0])||void 0===io||null===(lo=io.variables)||void 0===lo?void 0:lo.checkInTime)||"12PM"," ","- ",We("check_out"),":"," ",(null===Fo||void 0===Fo||null===(no=Fo.HotelPolicies[0])||void 0===no||null===(to=no.variables)||void 0===to?void 0:to.checkOutTime)||"11AM"]}),(0,M.jsxs)("span",{children:[t()(null===Co||void 0===Co?void 0:Co.checkInDate).format("ddd, DD MMM'YY")," -"," ",t()(null===Co||void 0===Co?void 0:Co.checkOutDate).format("ddd, DD MMM'YY")," ","|"," ",(0,M.jsxs)("span",{style:{background:"rgba(50, 116, 210, 0.1)",padding:"3px",borderRadius:"3px"},children:[null===Co||void 0===Co?void 0:Co.BookingItems[0].days," ",We("nights")]})]})]})]})}),(0,M.jsxs)("div",{className:"checkoutPage__room ",children:[(0,M.jsx)("span",{className:"checkoutPage__checkinLogo paymentColor",children:(0,M.jsx)("img",{src:B,alt:"user",width:"30px"})}),(0,M.jsxs)("div",{className:"checkoutPage__roomInfo",children:[(0,M.jsx)("p",{children:We("room_and_guest")}),(0,M.jsxs)("span",{children:[(0,M.jsx)("b",{children:So})," ",We("room")," ",(0,M.jsx)("b",{children:null===Co||void 0===Co?void 0:Co.totalGuests})," ",We("guests")," ",(0,M.jsxs)("b",{style:{fontWeight:"normal",fontSize:"0.8rem"},children:["(",(null===Co||void 0===Co?void 0:Co.adultCount)>0&&" ".concat(null===Co||void 0===Co?void 0:Co.adultCount," ").concat(We("adults")," "),(null===Co||void 0===Co?void 0:Co.childrenCount)>0&&"".concat(null===Co||void 0===Co?void 0:Co.childrenCount," ").concat((null===Co||void 0===Co?void 0:Co.childrenCount)>1?"".concat(We("children")):"".concat(We("child")))," ",(null===Co||void 0===Co?void 0:Co.infantCount)>0&&"".concat(null===Co||void 0===Co?void 0:Co.infantCount," ").concat((null===Co||void 0===Co?void 0:Co.childrenCount)>1?We("infants"):We("infant")),")"]})]})]})]}),(null===le||void 0===le?void 0:le.some(o=>["razorpay","VOUCHER"].includes(null===o||void 0===o?void 0:o.gateway)))&&(0,M.jsx)("div",{className:"checkoutPage__room",style:{marginLeft:"40px"},children:(0,M.jsxs)("div",{className:"checkoutPage__roomInfo",children:[(0,M.jsx)("p",{children:We("payment_status")}),null===le||void 0===le||null===(ao=le.filter(o=>["razorpay","VOUCHER"].includes(null===o||void 0===o?void 0:o.gateway)))||void 0===ao?void 0:ao.map(o=>{var e;return(0,M.jsxs)("p",{children:[(0,M.jsxs)("span",{children:[(0,M.jsx)(f.A,{amount:null===o||void 0===o?void 0:o.amountPaid})," -"," "]})," ",(0,M.jsx)("span",{style:{textTransform:"capitalize"},children:null===o||void 0===o?void 0:o.status}),"refunded"===(null===o||void 0===o?void 0:o.status)&&"razorpay"===(null===Be||void 0===Be?void 0:Be.vend
1or)&&(null===o||void 0===o||null===(e=o.refundData)||void 0===e?void 0:e.length)>0?(0,M.jsxs)("span",{style:{color:"var(--blue)",textDecoration:"underline"},onClick:()=>{de(o),se(!0),(0,w.fireGtmEvent)("refund_details_opened")},children:["- ",We("view_details")]}):(0,M.jsxs)("span",{style:{fontSize:"12px"},children:[" ",null===o||void 0===o?void 0:o.transactionId]})]},null===o||void 0===o?void 0:o.id)})]})})]}),(0,M.jsx)("div",{className:"paymentStatus__container2",children:(0,M.jsxs)("div",{className:"checkoutPage__selectedRooms",children:[(0,M.jsx)("p",{style:{color:"#000",fontSize:"1rem"},children:We("selected_rooms")}),Qo.map((o,e)=>{var i;return("room"===o.itemType||"hourly_room"===o.itemType)&&(0,M.jsx)(m.A,{room:null===o||void 0===o?void 0:o.HotelRoom,addons:null===Co||void 0===Co||null===(i=Co.BookingItems)||void 0===i?void 0:i.filter(e=>{var i;return"room_addon"===(null===e||void 0===e?void 0:e.itemType)&&"meal"===(null===e||void 0===e||null===(i=e.Addon)||void 0===i?void 0:i.category)&&(null===e||void 0===e?void 0:e.hotelRoomId)===(null===o||void 0===o?void 0:o.hotelRoomId)}),quantity:null===o||void 0===o?void 0:o.quantity,isConfirm:!0,isCheckout:!0,guestCount:null===o||void 0===o?void 0:o.totalGuests},e)})]})}),(0,M.jsxs)("div",{className:"paymentStatus__container2",children:[(0,M.jsx)("div",{className:"paymentStatusHeading",children:We("bill_details")}),(0,M.jsxs)("div",{className:"checkoutPage__billPreview",style:{width:"90%",margin:"0 auto",paddingTop:"0"},children:[null===Co||void 0===Co||null===(so=Co.BookingItems)||void 0===so||null===(ro=so.filter(o=>"room"===(null===o||void 0===o?void 0:o.itemType)||"hourly_room"===(null===o||void 0===o?void 0:o.itemType)))||void 0===ro?void 0:ro.map((o,e)=>{var i;const l=(()=>{try{var e;return JSON.parse(null===o||void 0===o||null===(e=o.HotelRoom)||void 0===e?void 0:e.ratePlanConfig)||{}}catch(i){return{}}})();return(0,M.jsxs)("div",{className:"checkoutPage__bill",children:[(0,M.jsxs)("span",{children:[null===o||void 0===o||null===(i=o.HotelRoom)||void 0===i?void 0:i.roomName," ",(null===l||void 0===l?void 0:l.name)&&" - ".concat(null===l||void 0===l?void 0:l.name," "),"(",(null===o||void 0===o?void 0:o.guests)+(null===o||void 0===o?void 0:o.adultCount)," ",We("adults")," ",(null===o||void 0===o?void 0:o.infantCount)>0&&"".concat(null===o||void 0===o?void 0:o.infantCount," ").concat(We("infant"))," ",(null===o||void 0===o?void 0:o.childCount)>0&&"".concat(null===o||void 0===o?void 0:o.childCount," ").concat(We("children"))," ",")"]}),(0,M.jsx)("p",{children:(0,M.jsx)(f.A,{amount:Number(null===o||void 0===o?void 0:o.originalAmount)})})]},e)}),ee.map((o,e)=>(0,M.jsxs)("div",{className:"checkoutPage__bill",children:[(0,M.jsxs)("span",{children:[null===o||void 0===o?void 0:o.name," x ",null===o||void 0===o?void 0:o.quantity," ",Number(null===o||void 0===o?void 0:o.price)<=0&&(0,M.jsxs)("p",{children:["(",We("included"),")"]})]}),(0,M.jsx)("p",{children:(0,M.jsx)(f.A,{amount:Number(null===o||void 0===o?void 0:o.price)})})]},e)),null===Co||void 0===Co||null===(co=Co.BookingItems)||void 0===co?void 0:co.map((o,e)=>{var i;return"hotel_addon"===o.itemType?(0,M.jsxs)("div",{className:"checkoutPage__bill",children:[(0,M.jsxs)("span",{children:[null===o||void 0===o||null===(i=o.HotelAddon)||void 0===i?void 0:i.name," x ",null===o||void 0===o?void 0:o.quantity," "]}),(0,M.jsx)("p",{children:(0,M.jsx)(f.A,{amount:Number(null===o||void 0===o?void 0:o.totalAmount)})})]},e):(0,M.jsx)(M.Fragment,{})}),!(null!==Co&&void 0!==Co&&Co.newAmount)&&(null===Co||void 0===Co?void 0:Co.totalDiscountAmount)>0&&(0,M.jsxs)("div",{className:"checkoutPage__bill",children:[(0,M.jsx)("span",{style:{color:"#6DA34D"},children:I.GS.includes(null===Co||void 0===Co||null===(uo=Co.Hotel)||void 0===uo?void 0:uo.id)?We("code_mount_applied"):"Promotion Applied"}),(0,M.jsxs)("p",{style:{color:"#6DA34D"},children:["- ",(0,M.jsx)(f.A,{amount:parseFloat(null===Co||void 0===Co?void 0:Co.totalDiscountAmount)})]})]}),(null===Co||void 0===Co?void 0:Co.taxData)&&!(null!==Co&&void 0!==Co&&null!==(vo=Co.taxData)&&void 0!==vo&&vo.isInclusive)&&(0,M.jsxs)("div",{className:"checkoutPage__bill",children:[(0,M.jsx)("span",{children:We("taxes")}),(0,M.jsxs)("p",{children:["+ ",(0,M.jsx)(f.A,{amount:Number(null===Co||void 0===Co||null===(mo=Co.taxData)||void 0===mo?void 0:mo.totalTax)})]})]}),Ho>0&&(0,M.jsxs)("div",{className:"checkoutPage__bill",children:[(0,M.jsx)("span",{style:{color:"#6DA34D"},children:"Gift Card Redeemed"}),(0,M.jsxs)("p",{style:{color:"#6DA34D"},children:["- ",(0,M.jsx)(f.A,{amount:Ho})]})]}),("PartialPayment"===Mo||"razorpay"===Mo)&&(0,M.jsxs)("div",{className:"checkoutPage__bill",children:[(0,M.jsx)("span",{children:We("advance_paid")}),(0,M.jsxs)("p",{style:{color:"#6DA34D"},children:["- ",(0,M.jsx)(f.A,{amount:Eo})]})]}),(0,M.jsxs)("div",{className:"finalBill",style:{fontSize:Lo&&"0.9rem",color:"#000"},children:[(0,M.jsx)("span",{children:We("amount_to_pay")}),(0,M.jsx)("p",{children:(0,M.jsx)(f.A,{amount:Math.max(0,parseFloat((null===Co||void 0===Co?void 0:Co.totalAmount)-Eo-Ho))})})]}),Lo&&(0,M.jsxs)("div",{className:"finalBill",style:{color:"#000"},children:[(0,M.jsxs)("span",{children:[We("updated_price")," "]}),(0,M.jsx)("p",{children:(0,M.jsx)(f.A,{amount:null===Co||void 0===Co?void 0:Co.newAmount})})]})]}),(0,M.jsx)(x.A,{})]}),Lo&&(0,M.jsx)("div",{className:"noteStatus",children:We("decline_price_refund_note")}),(0,M.jsx)("div",{className:"paymentStatusHeading",style:{paddingTop:"10px",paddingBottom:0,marginBottom:"-10px"},children:We("location")}),(0,M.jsx)("div",{className:"paymentStatusMap",children:(0,M.jsx)(v.default,{name:(0,I.SS)(null===Co||void 0===Co||null===(po=Co.Hotel)||void 0===po?void 0:po.name),address:(0,I.SS)(null===Co||void 0===Co||null===(ho=Co.Hotel)||void 0===ho?void 0:ho.address)})}),(0,M.jsx)("a",{className:"viewMapBtn",style:{width:"90%",margin:"0 auto"},href:"https://www.google.com/maps?q=".concat(null===Co||void 0===Co||null===(go=Co.Hotel)||void 0===go?void 0:go.latitude,",").concat(null===Co||void 0===Co||null===(yo=Co.Hotel)||void 0===yo?void 0:yo.longitude),target:"_blank",rel:"noreferrer",children:We("open_in_maps")}),De&&(0,M.jsxs)("div",{style:{borderRadius:"12px",border:"1px #C6C3C3 solid",color:"black",margin:"12px",marginTop:"24px"},children:[(0,M.jsxs)("div",{style:{borderBottom:"1px #C6C3C3 solid",padding:"6px 12px",display:"flex",gap:"8px"},children:[(0,M.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/assets/images/pin.svg",alt:"important"}),(0,M.jsx)("h3",{children:"IMPORTANT"})]}),(0,M.jsxs)("div",{style:{padding:"24px 42px",display:"flex",flexDirection:"column",gap:"12px"},children:[(0,M.jsx)("div",{children:(0,M.jsxs)("ul",{style:{listStylePosition:"inside"},children:[(0,M.jsxs)("li",{children:["Pay the full amount of"," ",(0,M.jsx)(f.A,{amount:Math.max(0,parseFloat((null===Co||void 0===Co?void 0:Co.totalAmount)-Eo-Ho))})," ","using any payment options before"," ",t()(null===Co||void 0===Co?void 0:Co.bnplCutoffDate).format("LLL")," to avoid auto cancellation."]}),(0,M.jsx)("li",{children:"Payment link will be sent to your email."}),(0,M.jsx)("li",{children:"No hidden charges."})]})}),(0,M.jsx)("div",{style:{height:"45px"},className:"booking-confirmation__pay-button",onClick:()=>{window.location.href="/checkout/".concat(null===Co||void 0===Co?void 0:Co.id,"?Razorpay")},children:"Pay Now & Confirm"})]})]}
1),Jo&&("paidyet"===(null===Be||void 0===Be?void 0:Be.vendor)?(0,M.jsx)(N.A,{isScriptLoaded:Ne,amount:null===Co||void 0===Co?void 0:Co.totalAmount}):(0,M.jsxs)("fieldset",{className:"confirmationPagePayments",children:[(0,M.jsx)("legend",{style:{color:"#000",fontSize:"1rem",fontWeight:"600",marginBottom:"10px"},children:We("payment_options")}),(0,M.jsxs)("div",{role:"radiogroup","aria-labelledby":"payment-options-legend",children:[(0,M.jsxs)("label",{className:"PartialPayment"===Xo?"selectedPayment":"checkoutPage__payment",style:{cursor:"pointer",display:"block"},children:[(0,M.jsx)("input",{type:"radio",name:"paymentOption",value:"PartialPayment",checked:"PartialPayment"===Xo,onChange:()=>Je("PartialPayment"),className:"visually-hidden","aria-label":"".concat(We("pay_just")," ").concat(null===Co||void 0===Co?void 0:Co.commissionAmount," ").concat(We("now_to_reserve"))}),(0,M.jsxs)("div",{className:"checkoutPage__paymentInfo",children:[(0,M.jsx)("span",{className:"form__logo","aria-hidden":"true",children:"PartialPayment"===Xo?(0,M.jsx)("img",{src:z,alt:""}):(0,M.jsx)("img",{src:Y,alt:""})}),(0,M.jsx)("div",{children:(0,M.jsxs)("p",{children:[" ",We("pay_just")," ",(0,M.jsx)(f.A,{amount:null===Co||void 0===Co?void 0:Co.commissionAmount})," ",We("now_to_reserve")]})})]})]}),(0,M.jsxs)("label",{className:"Razorpay"===Xo?"selectedPayment":"checkoutPage__payment",style:{cursor:"pointer",display:"block"},children:[(0,M.jsx)("input",{type:"radio",name:"paymentOption",value:"Razorpay",checked:"Razorpay"===Xo,onChange:()=>Je("Razorpay"),className:"visually-hidden","aria-label":We("pay_full_amount")}),(0,M.jsxs)("div",{className:"checkoutPage__paymentInfo",children:[(0,M.jsx)("span",{className:"form__logo","aria-hidden":"true",children:"Razorpay"===Xo?(0,M.jsx)("img",{src:z,alt:""}):(0,M.jsx)("img",{src:Y,alt:""})}),(0,M.jsx)("div",{children:(0,M.jsxs)("p",{children:[" ",We("pay_full_amount")]})})]})]})]})]})),["booked","confirmed_by_owner","checked_in"].includes(null===Co||void 0===Co?void 0:Co.status)&&(0,M.jsxs)("div",{className:"paymentStatusHeading",style:{paddingTop:"10px",paddingBottom:0,display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",flexWrap:"wrap"},children:[(0,M.jsx)("p",{style:{margin:0},children:We("cancel_booking_prompt")}),(0,M.jsx)("button",{className:"cancelBtn",style:{background:"var(--blue)",color:"#fff",margin:0,width:"auto"},onClick:()=>{Me(!0),(0,w.fireGtmEvent)("manage_booking_clicked")},children:We("manage_booking")||"Manage Booking"})]}),Te&&(0,M.jsx)("div",{className:"mainPage__cancelBooking",children:(0,M.jsxs)("div",{className:"cancelBooking__container",style:{maxWidth:"400px",borderRadius:"16px",boxShadow:"0 20px 60px rgba(0,0,0,0.15)"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"24px 28px 16px",borderBottom:"1px solid #f0f0f0",flexShrink:0},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,M.jsx)("div",{style:{width:"40px",height:"40px",borderRadius:"8px",background:"var(--blue)",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,M.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,M.jsx)("path",{d:"M19 4H5C3.89543 4 3 4.89543 3 6V20C3 21.1046 3.89543 22 5 22H19C20.1046 22 21 21.1046 21 20V6C21 4.89543 20.1046 4 19 4Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,M.jsx)("path",{d:"M16 2V6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,M.jsx)("path",{d:"M8 2V6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,M.jsx)("path",{d:"M3 10H21",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,M.jsx)("h2",{style:{fontSize:"1.125rem",fontWeight:"600",color:"#1a1a1a",margin:0},children:We("manage_booking")||"Manage Booking"})]}),(0,M.jsx)("button",{onClick:()=>{Me(!1),we(""),pe(""),be(null),fe(!1)},style:{background:"transparent",border:"none",borderRadius:"8px",width:"36px",height:"36px",cursor:"pointer",fontSize:"20px",color:"#999",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease"},onMouseOver:o=>{o.currentTarget.style.background="#f5f5f5",o.currentTarget.style.color="#333"},onMouseOut:o=>{o.currentTarget.style.background="transparent",o.currentTarget.style.color="#999"},"aria-label":"Close",children:"\u2715"})]}),(0,M.jsxs)("div",{style:{overflowY:"auto",flex:1,padding:"20px 28px 28px",width:"100%"},children:[(0,M.jsxs)("div",{style:{width:"100%",marginBottom:"16
1px"},children:[(0,M.jsx)("label",{style:{display:"block",fontSize:"0.8rem",fontWeight:"600",color:"#666",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.5px"},children:We("phone_number")||"Phone Number"}),(0,M.jsx)(g.Ay,{defaultCountry:Ge,name:"phone",placeholder:We("enter_phone")||"Enter phone number",value:ke,onChange:o=>we(o),disabled:!(null===je||void 0===je||!je.id),style:{display:"flex",alignItems:"center",height:"52px",background:"#f8f9fa",borderRadius:"8px",border:"1px solid #e8e8e8",padding:"0 12px",gap:"8px"},numberInputProps:{style:{flex:1,height:"100%",padding:"0 8px",border:"none",background:"transparent",fontSize:"1rem",outline:"none",color:"#333"}}})]}),(0,M.jsxs)("div",{style:{width:"100%",marginBottom:"24px"},children:[(0,M.jsx)("label",{style:{display:"block",fontSize:"0.8rem",fontWeight:"600",color:"#666",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.5px"},children:We("booking_id")||"Booking ID"}),(0,M.jsxs)("div",{style:{background:"#f8f9fa",borderRadius:"8px",border:"1px solid #e8e8e8",display:"flex",alignItems:"center",padding:"0 16px",height:"52px",transition:"all 0.2s ease"},children:[(0,M.jsx)("span",{style:{color:"#999",fontSize:"1rem",marginRight:"4px"},children:"#"}),(0,M.jsx)("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:me,placeholder:We("enter_booking_id")||"Enter Booking ID",onChange:o=>pe(o.target.value.replace(/\D/g,"")),disabled:!(null===je||void 0===je||!je.id),style:{width:"100%",border:"none",background:"transparent",padding:"0",fontSize:"1rem",color:"#333",outline:"none"}})]})]}),!(null!==je&&void 0!==je&&je.id)&&(0,M.jsxs)("div",{style:{display:"flex",gap:"12px",width:"100%"},children:[(0,M.jsxs)("button",{disabled:Re,onClick:async()=>{(0,w.fireGtmEvent)("manage_booking_cancel_clicked"),await(async()=>{if(!Re){if(!ke||!(0,g.g0)(String(ke)))return be(null),void j().error(We("enter_valid_phone_number"));if(me){He(!0);let i=(0,g.parsePhoneNumber)(String(ke)),l={dialCode:"+".concat(null===i||void 0===i?void 0:i.countryCallingCode),mobile:null===i||void 0===i?void 0:i.nationalNumber.replace(/\s+/g,""),bookingId:me};(0,w.fireGtmEvent)("cancel_booking_verify",{cancelData:l});try{const e=await(0,y.L3)(l);var o;200===(null===e||void 0===e?void 0:e.status)?(be(null===e||void 0===e?void 0:e.data),null!==e&&void 0!==e&&null!==(o=e.data)&&void 0!==o&&o.id&&ge(!0)):400===(null===e||void 0===e?void 0:e.status)&&(be(null),_e((null===e||void 0===e?void 0:e.error)||(null===e||void 0===e?void 0:e.message)),fe(!0))}catch(e){(0,w.fireGtmEvent)("cancel_booking_failed",l)}finally{He(!1)}}else j().error(We("enter_booking_id"))}})()},style:{flex:1,padding:"14px 16px",borderRadius:"8px",fontSize:"0.9rem",fontWeight:"600",cursor:Re?"not-allowed":"pointer",opacity:Re?.6:1,backgroundColor:"#fff",color:"#dc3545",border:"1px solid #dc3545",transition:"all 0.2s ease",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"},children:[(0,M.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,M.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Re?We("verifying")||"Verifying...":We("cancel")||"Cancel"]}),(0,M.jsxs)("button",{disabled:Re,onClick:()=>{(0,w.fireGtmEvent)("manage_booking_modify_clicked"),me?(Me(!1),window.location.href="/bookings/modify/".concat(me)):j().error(We("enter_booking_id")||"Please enter booking id!")},style:{flex:1,padding:"14px 16px",borderRadius:"8px",fontSize:"0.9rem",fontWeight:"600",cursor:Re?"not-allowed":"pointer",opacity:Re?.6:1,background:"var(--blue)",color:"#fff",border:"none",transition:"all 0.2s ease",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"},children:[(0,M.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,M.jsx)("path",{d:"M11 4H4C3.46957 4 2.96086 4.21071 2.58579 4.58579C2.21071 4.96086 2 5.46957 2 6V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,M.jsx)("path",{d:"M18.5 2.50001C18.8978 2.10219 19.4374 1.87869 20 1.87869C20.5626 1.87869 21.1022 2.10219 21.5 2.50001C21.8978 2.89784 22.1213 3.4374 22.1213 4.00001C22.1213 4.56262 21.8978 5.10219 21.5 5.50001L12 15L8 16L9 12L18.5 2.50001Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),We("modify")||"Modify"]})]}),(null===je||void 0===je?void 0:je.id)>0&&(0,M.jsxs)("div",{className:"cancelBookingInfo",children:[(0,M.jsxs)("div",{className:"cancelRow",children:[(0,M.jsx)("p",{children:We("booking_id")||"Booking ID"}),(0,M.jsxs)("p",{children:["#",null===je||void 0===je?void 0:je.id]})]}),(0,M.jsxs)("div",{className:"cancelRow",children:[(0,M.jsx)("p",{children:We("total_amount")}),(0,M.jsx)("p",{children:(0,M.jsx)(f.A,{amount:null===je||void 0===je?void 0:je.totalAmount})})]}),(0,M.jsxs)("div",{className:"cancelRow",children:[(0,M.jsx)("p",{children:We("amount_paid")}),(0,M.jsx)("p",{children:(0,M.jsx)(f.A,{amount:null===je||void 0===je?void 0:je.amountPaid})})]}),(null===je||void 0===je?void 0:je.giftCardAmount)>0&&(0,M.jsxs)("div",{className:"cancelRow",children:[(0,M.jsx)("p",{children:"Gift Card"}),(0,M.jsx)("p",{children:(0,M.jsx)(f.A,{amount:null===je||void 0===je?void 0:je.giftCardAmount})})]}),(null===je||void 0===je?void 0:je.giftCardRefundAmount)>0&&(0,M.jsxs)("div",{className:"cancelRow",children:[(0,M.jsx)("p",{style:{color:"#6DA34D"},children:"Gift Card Refund"}),(0,M.jsx)("p",{style:{color:"#6DA34D"},children:(0,M.jsx)(f.A,{amount:null===je||void 0===je?void 0:je.giftCardRefundAmount})})]}),null!==je&&void 0!==je&&je.convenienceFee&&(null===je||void 0===je?void 0:je.convenienceFee)>0?(0,M.jsxs)("div",{className:"cancelRow",children:[(0,M.jsxs)("div",{style:{display:"flex",gap:"2px",alignItems:"center"},children:[(0,M.jsx)("p",{style:{color:"black",fontSize:"14px"},children:We("convenience_fee")}),(0,M.jsxs)("div",{className:"tooltip-container",style:{position:"relative",display:"inline-block"},onMouseEnter:o=>{const e=o.currentTarget.querySelector(".tooltip-text");e&&(e.style.visibility="visible",e.style.opacity="1"),(0,w.fireGtmEvent)("c
1onvenience_fee_tooltip_hovered",{hotelName:null===Fe||void 0===Fe?void 0:Fe.name,bookingId:null===je||void 0===je?void 0:je.id})},onMouseLeave:o=>{const e=o.currentTarget.querySelector(".tooltip-text");e&&(e.style.visibility="hidden",e.style.opacity="0")},children:[(0,M.jsx)("span",{style:{color:"black",fontSize:"12px",border:"1px solid black",borderRadius:"50%",width:"16px",height:"16px",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"},children:"?"}),(0,M.jsx)("div",{className:"tooltip-text",style:{visibility:"hidden",opacity:0,minWidth:"200px",maxWidth:"90vw",backgroundColor:"#333",color:"#fff",textAlign:"left",borderRadius:"6px",padding:"8px 12px",position:"absolute",zIndex:1e3,top:"50%",transform:"translateY(-50%)",fontSize:"12px",transition:"opacity 0.3s ease",boxShadow:"0 4px 12px rgba(0,0,0,0.3)",pointerEvents:"none",whiteSpace:"normal",wordWrap:"break-word"},children:We("processing_fee_notice")})]})]}),(0,M.jsx)("p",{style:{color:"black",fontSize:"14px"},children:(0,M.jsx)(f.A,{amount:null===je||void 0===je?void 0:je.convenienceFee})})]}):null,(0,M.jsxs)("div",{className:"cancelRow",children:[(0,M.jsx)("p",{style:{color:"red"},children:We("refund_amount")}),(0,M.jsx)("p",{style:{color:"red"},children:(0,M.jsx)(f.A,{amount:null===je||void 0===je?void 0:je.refundAmount})})]}),(0,M.jsxs)("div",{className:"cancelRow cancelConfirmation",children:[(0,M.jsx)("p",{className:"cancelConfirmation__text",children:We("cancel_confirmation")}),(0,M.jsxs)("div",{className:"cancelConfirmation__buttons",children:[(0,M.jsx)("button",{className:"cancelConfirmBtn cancelConfirmBtn--yes",disabled:Re,onClick:async()=>{if(Re)return;let o=(0,g.parsePhoneNumber)(String(ke));if(!(0,g.g0)(String(ke)))return void j().error(We("enter_valid_phone_number"));if(!me)return void j().error(We("enter_booking_id"));let e={dialCode:"+".concat(null===o||void 0===o?void 0:o.countryCallingCode),mobile:null===o||void 0===o?void 0:o.nationalNumber.replace(/\s+/g,""),bookingId:me};(0,w.fireGtmEvent)("cancel_booking",{cancelData:e});try{He(!0);const o=await(0,y.r3)(e);200===(null===o||void 0===o?void 0:o.status)?(ve(!1),Me(!1),we(""),pe(""),ge(!1),be(null),fe(!1),He(!1),j().success(We("booking_cancelled_successfully")),setTimeout(()=>{window.location.reload()},1500)):(j().error(We("try_again_later")),He(!1))}catch(i){(0,w.fireGtmEvent)("cancel_api_failed",(0,l.A)((0,l.A)({},e),{},{level:2})),He(!1)}},children:Re?We("cancelling")||"Cancelling...":We("yes_option")}),(0,M.jsx)("button",{className:"cancelConfirmBtn cancelConfirmBtn--no",disabled:Re,onClick:()=>{Me(!1),we(""),pe(""),be(null),fe(!1)},children:We("no_option")})]})]})]}),ye&&!(null!==je&&void 0!==je&&je.id)&&(0,M.jsx)("div",{style:{marginTop:"16px",padding:"12px 16px",background:"#fff5f5",border:"1px solid #ffcdd2",borderRadius:"10px",color:"#c62828",fontSize:"0.9rem",textAlign:"center"},children:xe||We("no_booking_found")||"No booking found with these details"})]})]})}),Lo?(0,M.jsxs)("div",{className:"paymentStatus__Call",children:[(0,M.jsx)("button",{onClick:()=>Ke(!1),children:We("reject_action")}),(0,M.jsx)("button",{onClick:()=>Ke(!0),children:We("accept_action")})]}):(0,M.jsx)("div",{className:"paymentStatus__Call",children:Jo?"paidyet"===(null===Be||void 0===Be?void 0:Be.vend
1or)?(0,M.jsx)(N.A,{isScriptLoaded:Ne,amount:null===Co||void 0===Co?void 0:Co.totalAmount}):(0,M.jsx)(M.Fragment,{children:"PartialPayment"===Xo?(0,M.jsxs)("button",{style:{width:"100%",padding:"10px",background:"var(--blue)",color:"#fff",fontSize:"1rem"},onClick:Xe,children:[We("pay_just")," ",(0,M.jsx)(f.A,{amount:null===Co||void 0===Co?void 0:Co.commissionAmount})," ",We("now_to_reserve")]}):(0,M.jsxs)("button",{style:{width:"100%",padding:"10px",background:"var(--blue)",color:"#fff",fontSize:"1rem"},onClick:Xe,children:[We("pay_full_amount")," "]})}):(0,M.jsxs)(M.Fragment,{children:["pending"!==(null===Co||void 0===Co?void 0:Co.status)&&(0,M.jsx)("a",{href:"tel:".concat((null===Co||void 0===Co?void 0:Co.Hotel.dialCode)+(null===Co||void 0===Co?void 0:Co.Hotel.mobile)),children:We("call_hotel")}),"pending"===(null===Co||void 0===Co?void 0:Co.status)?(0,M.jsx)("a",{href:"/checkout/".concat(null===Co||void 0===Co?void 0:Co.id),style:{width:"100%"},children:We("complete_bookings")}):(0,M.jsx)("a",{target:"_self",href:"https://".concat(null===Co||void 0===Co?void 0:Co.Hotel.websiteSlug,".bookmystay.io?utm_source=").concat(null===Co||void 0===Co?void 0:Co.source),children:We("go_home")})]})}),ae&&(0,M.jsx)("div",{className:"paymentPopup",children:(0,M.jsxs)("div",{className:"paymentPopupContainer",children:[(0,M.jsxs)("div",{className:"paymentPopupTitle",onClick:()=>{se(!1),(0,w.fireGtmEvent)("refund_details_closed")},children:[(0,M.jsx)("p",{children:We("refund_details")}),(0,M.jsx)("p",{children:"X"})]}),(0,M.jsx)("div",{className:"paymentPopupDetails",children:null===te||void 0===te||null===(fo=te.refundData)||void 0===fo?void 0:fo.map((o,e)=>{const i=Object.keys(null===o||void 0===o?void 0:o.acquirer_data)[0]||"";return(0,M.jsxs)("div",{className:"paymentRowDetail",children:[(0,M.jsxs)("p",{style:{fontSize:"0.9rem"},children:["\u2022"," ",t().unix(null===o||void 0===o?void 0:o.created_at).format("DD/MM/YYYY hh:MM:ss A")]}),(0,M.jsxs)("p",{style:{marginLeft:"10px",fontWeight:"500"},children:[(0,M.jsx)(f.A,{amount:(null===o||void 0===o?void 0:o.amount)/100}),","," ",(0,M.jsx)("b",{style:{textTransform:"uppercase",fontWeight:"normal"},children:i})," ","- ",null===o||void 0===o?void 0:o.acquirer_data[i]]})]},null===o||void 0===o?void 0:o.created_at)})})]})}),(0,M.jsxs)("div",{className:"paymentStatus__footer",children:[(0,P.DF)(Oe,D.i.HOME.PAYMENT_FOOTER)?(0,M.jsx)(r.LazyLoadComponent,{children:(0,M.jsx)(b.default,{})}):null,(0,M.jsx)(c.default,{slug:null===Co||void 0===Co||null===(xo=Co.Hotel)||void 0===xo?void 0:xo.websiteSlug,name:null===Co||void 0===Co||null===(_o=Co.Hotel)||void 0===_o?void 0:_o.name,brandName:null===Oe||void 0===Oe||null===(jo=Oe.pages)||void 0===jo||null===(bo=jo.home)||void 0===bo||null===(ko=bo.footer)||void 0===ko?void 0:ko.brandName})]})]})]})}},9368:(o,e,i)=>{i.d(e,{A:()=>d});var l=i(6177),n=i(475),t=i(579);const d=()=>{const{isConverted:o,effectiveCurrency:e,hotelCurrency:i}=(0,l.A)();return o?(0,t.jsxs)("div",{style:{background:"#FFF8E1",border:"1px solid #FFE082",borderRadius:"8px",padding:"10px 14px",margin:"10px 0",fontSize:"13px",color:"#5D4037",display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{fontSize:"16px"},children:"\u24d8"}),(0,t.jsxs)("span",{children:["Prices shown in ",e," (",(0,n.Gl)(e),"). You will be charged in"," ",i," (",(0,n.Gl)(i),")."]})]}):null}}}]); 2//# sourceMappingURL=2230.39eaec8c.chunk.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.