1import{d as w,j as e}from"./vendor-react-DfYGAhtm.js";import{bN as g,c3 as R}from"./vendor-icons-1odZwi-b.js";import{u as O,e as k}from"./vendor-state-BsBVN-fX.js";import{m as r,g as W,bI as C,B as u,t as D}from"./index-DsBgCU7r.js";import{u as N,T as _}from"./useTravelFlowGuard-BzKYpJZB.js";import{u as z}from"./useTravelStepBreadcrumbs-D2HQAol8.js";import{u as F}from"./useAnalytics-HP01GbIH.js";import{S as K}from"./StepPageLayout-DdZUweau.js";import{C as h}from"./CollapsibleSection-5BGvoOUT.js";import{g as L}from"./errors-BYKXB8DF.js";import{a as B,t as I}from"./travelPolicyApi-CKfMwwJq.js";import{T as H}from"./routes-SlierU_8.js";import{a as i,V as d,i as P,T as o,H as S,v as y,w as f,F as v}from"./vendor-ui-DA_r9yXk.js";import"./vendor-forms-BP-7CbAP.js";import"./stepBreadcrumbs-FCtSk5Kj.js";const a=({label:s,value:n})=>e.jsxs(i,{px:{base:4,md:5},py:4,bg:r.white.DEFAULT,borderRadius:"xl",borderWidth:"1px",borderColor:r.border.primary,transition:"border-color 0.15s ease, box-shadow 0.15s ease",_hover:{borderColor:r.orange[100],boxShadow:"0 1px 8px rgba(15, 23, 42, 0.06)"},children:[e.jsx(o,{fontSize:"xs",fontWeight:"semibold",color:r.text.gray,textTransform:"uppercase",letterSpacing:"0.06em",mb:1.5,children:s}),e.jsx(o,{fontSize:"md",fontWeight:"semibold",color:r.text.label,lineHeight:"short",wordBreak:"break-word",children:n})]}),j=({title:s,subtitle:n,icon:x})=>e.jsxs(S,{gap:3,align:"center",minW:0,children:[e.jsx(v,{boxSize:{base:10,md:11},borderRadius:"xl",bg:r.orange[50],align:"center",justify:"center",flexShrink:0,borderWidth:"1px",borderColor:r.orange[100],children:e.jsx(y,{as:x,boxSize:5,color:r.orange[500]})}),e.jsxs(d,{align:"flex-start",gap:0,minW:0,children:[e.jsx(o,{fontSize:"sm",fontWeight:"bold",color:r.text.label,lineHeight:"short",children:s}),e.jsx(o,{fontSize:"xs",color:r.text.gray,lineHeight:"short",children:n})]})]}),oe=()=>{const{isBlocked:s}=N(_.ReviewSubmit),{items:n}=z(),x=w(),T=O(),{tripDetails:l,traveller:t,createdApplication:c}=k(b=>b.travelFlow),{addTravellerAsync:A,isLoading:m}=B(),{track:p}=F();if(s||!l||!t||!c)return null;const E=async()=>{try{await A({policyId:c.id,passportNumber:t.passportNumber,dob:I(t.dateOfBirth),nextOfKinName:t.nextOfKinName,nextOfKinPhone:t.nextOfKinPhone,nextOfKinEmail:t.nextOfKinEmail,nextOfKinAddress:t.nextOfKinAddress}),T(C(!0)),p(u.FORM_TRAVEL_SUBMITTED,{product_type:"travel",destination_region:l.destination}),x(`/${H.Submitted}`,{replace:!0})}catch(b){p(u.FORM_TRAVEL_SUBMIT_FAILED,{product_type:"travel",failure_reason:"server_error"}),D.error(L(b)??"Unable to submit your request right now. Please try again.")}};return e.jsx(K,{items:n,contentMaxW:"800px",mobileContentOnly:!0,children:e.jsx(i,{bg:"white",borderRadius:"2xl",p:{base:6,md:10},background:`linear-gradient(155deg, ${r.white.DEFAULT} 45%, ${r.orange[50]} 115%)`,border:"1px solid",borderColor:r.border.secondary,boxShadow:"0 12px 40px rgba(15, 23, 42, 0.06)",children:e.jsxs(d,{gap:{base:6,md:8},align:"stretch",children:[e.jsxs(i,{children:[e.jsxs(P,{fontSize:{base:"3xl",md:"4xl"},fontWeight:"bold",color:r.text.label,mb:2,letterSpacing:"-0.02em",children:[e.jsxs(o,{as:"span",color:r.orange[500],children:["Review &"," "]}),"Submit"]}),e.jsx(o,{fontSize:"md",color:r.text.gray,maxW:"lg",children:"Confirm your trip and traveller information before requesting your quote."})]}),e.jsxs(d,{align:"stretch",gap:4,children:[e.jsx(i,{bg:r.gray[50],borderRadius:"2xl",borderWidth:"1px",borderColor:r.border.primary,p:{base:4,md:5},children:e.jsx(h,{label:e.jsx(j,{title:"Trip details",subtitle:"Destination & travel dates",icon:g}),children:e.jsxs(d,{align:"stretch",gap:4,children:[e.jsxs(i,{px:{base:4,md:5},py:5,bg:r.white.DEFAULT,borderRadius:"xl",borderWidth:"1px",borderColor:r.border.primary,backgroundImage:`linear-gradient(135deg, ${r.white.DEFAULT} 0%, ${r.orange[50]} 140%)`,children:[e.jsxs(S,{gap:2,mb:2,color:r.orange[600],children:[e.jsx(y,{as:g,boxSize:4,flexShrink:0}),e.jsx(o,{fontSize:"xs",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"0.08em",children:"Destination"})]}),e.jsx(o,{fontSize:{base:"xl",md:"2xl"},fontWeight:"bold",color:r.text.primary,lineHeight:"short",children:l.destination})]}),e.jsxs(f,{columns:{base:1,md:2},gap:3,children:[e.jsx(a,{label:"Departure",value:l.departureDate}),e.jsx(a,{label:"Return",value:l.returnDate})]})]})})}),e.jsx(i,{bg:r.gray[50],borderRadius:"2xl",borderWidth:"1px",borderColor:r.border.primary,p:{base:4,md:5},children:e.jsx(h,{label:e.jsx(j,{title:"Traveller information",subtitle:"Identity & emergency contact",icon:R}),children:e.jsxs(f,{columns:{base:1,md:2},gap:3,children:[e.jsx(a,{label:"Passport number",value:t.passportNumber}),e.jsx(a,{label:"Date of birth",value:t.dateOfBirth}),e.jsx(a,{label:"Next of kin",value:t.nextOfKinName}),e.jsx(a,{label:"Next of kin phone",value:t.nextOfKinPhone}),e.jsx(a,{label:"Next of kin email",value:t.nextOfKinEmail}),e.jsx(a,{label:"Next of kin address",value:t.nextOfKinAddress})]})})})]}),e.jsx(v,{direction:"column",align:{base:"stretch",sm:"flex-end"},gap:3,pt:2,children:e.jsx(W,{buttonType:"primary",text:"Request Quote",size:"lg",type:"button",onClick:E,loading:m,disabled:m,minW:{base:"100%",sm:"220px"}})})]})})})};export{oe 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.