1/*! For license information please see 3418.9312796d.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[3418],{23658:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(77784).A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]])},35327:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(77784).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},43418:(e,s,t)=>{t.r(s),t.d(s,{default:()=>N});var a=t(65043),l=t(18163),i=t(91140),n=t(13390),r=t(76245),c=t(23658),d=t(85692),o=t(36210),m=t(75088),x=t(86376),h=t(70764),b=t(35327),u=t(50516),f=t(55076),p=t(46913),g=t(70579);const y="https://balkandestination.com",j={blue:{bg:"bg-blue-50",border:"border-blue-200",text:"text-blue-800",icon:"text-blue-600",dot:"bg-blue-500"},amber:{bg:"bg-amber-50",border:"border-amber-200",text:"text-amber-900",icon:"text-amber-600",dot:"bg-amber-500"},emerald:{bg:"bg-emerald-50",border:"border-emerald-200",text:"text-emerald-800",icon:"text-emerald-600",dot:"bg-emerald-500"},red:{bg:"bg-red-50",border:"border-red-200",text:"text-red-800",icon:"text-red-600",dot:"bg-red-500"}},N=()=>{const e=(0,l.g)(),s=e.reference||e.bookingRef,{t:t,getLocalizedPath:N}=(0,p.ok)(),[k,v]=(0,a.useState)(null),[w,A]=(0,a.useState)(!1),[$,C]=(0,a.useState)(null),_=(0,a.useCallback)(async(e=!1)=>{e||A(!0);try{const e=await fetch(`${y}/api/daily-tours/public/booking/${s}`);if(e.ok){const s=await e.json();v(s.booking||null),C(new Date)}}finally{e||A(!1)}},[s]);(0,a.useEffect)(()=>{_();const e=setInterval(()=>_(!0),15e3);return()=>clearInterval(e)},[_]);const q=(e=>{if(!e)return null;const s=(e.status||"").toLowerCase(),t=(e.payment_status||"").toLowerCase();return"cancelled"===s||"declined"===s?{key:"cancelled",label:"Could not be confirmed",tone:"red",icon:r.A,message:"We were unable to confirm this booking. Please check your email for details or book a different date."}:"paid"===t?{key:"paid",label:"Booked & paid \u2014 see you soon!",tone:"emerald",icon:o.A,message:"Your payment is complete. We will be in touch with final logistics."}:"confirmed"!==s||"awaiting_payment"!==t&&!e.payment_link_sent?"confirmed"===s?{key:"confirmed",label:"Confirmed",tone:"emerald",icon:o.A,message:"Your booking is confirmed."}:{key:"pending",label:"Awaiting confirmation",tone:"blue",icon:m.A,message:"Our team is checking availability with the partner. You will get an email as soon as it is confirmed (usually within 24 hours)."}:{key:"awaiting_payment",label:"Confirmed \u2014 payment link sent",tone:"amber",icon:x.A,message:"Great news! Your booking is confirmed. Please check your email for the payment link to finalize."}})(k),M=q?j[q.tone]:j.blue,L=(null===q||void 0===q?void 0:q.icon)||m.A,R=null!==k&&void 0!==k&&k.payment_link_sent&&null!==k&&void 0!==k&&k.booking_reference?`${y.replace(/\/$/,"").replace(/\/api$/,"")}/daily-tours/payment/${k.booking_reference}`:null;return(0,g.jsx)(f.P,{children:(0,g.jsx)("div",{className:"min-h-screen bg-gray-50",children:(0,g.jsx)("div",{className:"container mx-auto px-4 py-12",children:(0,g.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,g.jsxs)("div",{className:"text-center mb-6",children:[(0,g.jsx)("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:(0,g.jsx)(o.A,{className:"h-10 w-10 text-green-700"})}),(0,g.jsx)("h1",{className:"text-3xl font-bold text-gray-900 mb-2","data-testid":"daily-tour-request-submitted-title",children:t("requestReceived")}),(0,g.jsx)("p",{className:"text-gray-600",children:t("thankYouRequestReceived")})]}),(0,g.jsx)(i.Zp,{className:"mb-4",children:(0,g.jsx)(i.Wu,{className:"p-6",children:(0,g.jsxs)("div",{className:"bg-blue-50 p-4 rounded-lg text-center",children:[(0,g.jsx)("p",{className:"text-sm text-blue-600 mb-1",children:t("referenceNumber")}),(0,g.jsx)("p",{className:"text-2xl font-mono font-bold text-blue-800",children:s})]})})}),q&&(0,g.jsx)(i.Zp,{className:`mb-4 border-2 ${M.border}`,"data-testid":"booking-status-banner",children:(0,g.jsx)(i.Wu,{className:`p-5 ${M.bg}`,children:(0,g.jsxs)("div",{className:"flex items-start gap-3",children:[(0,g.jsxs)("div",{className:"relative mt-1",children:[(0,g.jsx)(L,{className:`h-6 w-6 ${M.icon}`}),"pending"===q.key&&(0,g.jsxs)("span",{className:"absolute -top-1 -right-1 flex h-3 w-3",children:[(0,g.jsx)("span",{className:`animate-ping absolute inline-flex h-full w-full rounded-full ${M.dot} opacity-75`}),(0,g.jsx)("span",{className:`relative inline-flex rounded-full h-3 w-3 ${M.dot}`})]})]}),(0,g.jsxs)("div",{className:"flex-1",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,g.jsx)("p",{className:`font-semibold ${M.text}`,"data-testid":"booking-status-label",children:q.label}),(0,g.jsxs)("button",{onClick:()=>_(),disabled:w,className:`text-xs ${M.text} hover:underline inline-flex items-center gap-1 disabled:opacity-50`,"data-testid":"refresh-status-btn","aria-label":"Refresh status",children:[(0,g.jsx)(u.A,{className:"h-3 w-3 "+(w?"animate-spin":"")}),w?"Refreshing\u2026":"Refresh"]})]}),(0,g.jsx)("p",{className:`text-sm mt-1 ${M.text}`,children:q.message}),R&&"awaiting_payment"===q.key&&(0,g.jsxs)("a",{href:R,className:"mt-3 inline-flex items-center gap-1 bg-emerald-600 hover:bg-emerald-700 text-white px-4 py-2 rounded-lg text-sm font-semibold","data-testid":"status-pay-now-btn",children:[(0,g.jsx)(x.A,{className:"h-4 w-4"})," Pay Now ",(0,g.jsx)(h.A,{className:"h-3 w-3"})]}),$&&(0,g.jsxs)("p",{className:"text-[11px] text-gray-500 mt-2",children:["Live status \u2014 auto-refreshes every 15s. Last checked ",$.toLocaleTimeString(),"."]})]})]})})}),(0,g.jsx)(i.Zp,{className:"mb-6",children:(0,g.jsx)(i.Wu,{className:"p-6",children:(0,g.jsxs)("div",{className:"space-y-6",children:[(0,g.jsxs)("div",{className:"flex items-start gap-4",children:[(0,g.jsx)("div",{className:"w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center flex-shrink-0",children:(0,g.jsx)(m.A,{className:"h-5 w-5 text-blue-600"})}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("h3",{className:"font-semibold text-gray-900",children:["1. ",t("weReviewRequest")]}),(0,g.jsx)("p",{className:"text-sm text-gray-600",children:t("reviewDesc")})]})]}),(0,g.jsxs)("div",{className:"flex items-start gap-4",children:[(0,g.jsx)("div",{className:"w-10 h-10 bg-green-100 rounded-full flex items-center justify-center flex-shrink-0",children:(0,g.jsx)(b.A,{className:"h-5 w-5 text-green-700"})}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("h3",{className:"font-semibold text-gray-900",children:["2. ",t("confirmationEmail")]}),(0,g.jsx)("p",{className:"text-sm text-gray-600",children:t("confirmationEmailDesc")})]})]}),(0,g.jsxs)("div",{className:"flex items-start gap-4",children:[(0,g.jsx)("div",{className:"w-10 h-10 bg-purple-100 rounded-full flex items-center justify-center flex-shrink-0",children:(0,g.jsx)(x.A,{className:"h-5 w-5 text-purple-600"})}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("h3",{className:"font-semibold text-gray-900",children:["3. ",t("completePaymentStep")]}),(0,g.jsx)("p",{className:"text-sm text-gray-600",children:t("completePaymentStepDesc")})]})]}),(0,g.jsxs)("div",{className:"flex items-start gap-4",children:[(0,g.jsx)("div",{className:"w-10 h-10 bg-yellow-100 rounded-full flex items-center justify-center flex-shrink-0",children:(0,g.jsx)(o.A,{className:"h-5 w-5 text-yellow-600"})}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("h3",{className:"font-semibold text-gray-900",children:["4. ",t("bookingConfirmedStep")]}),(0,g.jsx)("p",{className:"text-sm text-gray-600",children:t("bookingConfirmedStepDesc")})]})]})]})})}),(0,g.jsxs)("div",{className:"flex gap-3",children:[(0,g.jsx)(n.$,{asChild:!0,variant:"outline",className:"flex-1",children:(0,g.jsxs)(l.N_,{to:N("/"),children:[(0,g.jsx)(c.A,{className:"h-4 w-4 mr-1"})," Home"]})}),(0,g.jsx)(n.$,{asChild:!0,className:"flex-1 bg-emerald-600 hover:bg-emerald-700",children:(0,g.jsxs)(l.N_,{to:N("/daily-tours"),children:["Browse More ",(0,g.jsx)(d.A,{className:"h-4 w-4 ml-1"})]})})]})]})})})})}},50516:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(77784).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},70764:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(77784).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},76245:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(77784).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},86376:(e,s,t)=>{t.d(s,{A:()=>a});
2const a=(0,t(77784).A)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])}}]); 3//# sourceMappingURL=3418.9312796d.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.