1import{j as e,d as K,l as Y,r as R}from"./vendor-react-DfYGAhtm.js";import{m as r,al as B,am as E,g as w,I as N,aR as Q,M as P,aJ as J}from"./index-DsBgCU7r.js";import{g as q,f as D,e as X,h as Z,C as ee,a as H,d as T}from"./claimMappers-CQORzb1J.js";import{as as U,aA as re,p as te,aB as ie,aC as oe,I as se,z as M,aD as le,aE as ne,aF as ae,aG as ce,aH as de,aI as me,aJ as xe,A as pe}from"./vendor-icons-1odZwi-b.js";import{H as g,T as o,ae as ue,a as l,h as p,F as h,a9 as W,o as F,w as C,V as L,S as he,G as be}from"./vendor-ui-DA_r9yXk.js";import{o as V}from"./other-icon-DC1bN4dP.js";import{I as z}from"./healthCategoryUi-C2_keODf.js";import{i as fe,f as ge}from"./underwriterDisplay-CEihXxjA.js";import{f as je}from"./currency-tq8RhIEU.js";import{P as ye,U as Ce,a as Se}from"./PolicyStatusCard-CW7LcbtB.js";import"./normalizeBrand-Cr5Qmi7I.js";import"./PolicyContributionFilters-CIXgAXYH.js";import{g as we}from"./errors-BYKXB8DF.js";import{C as ke}from"./CollapsibleSection-5BGvoOUT.js";import{M as ve}from"./constants-DZgaJSjb.js";import{S as k}from"./StepPageLayout-DdZUweau.js";import"./vendor-state-BsBVN-fX.js";import"./vendor-forms-BP-7CbAP.js";import"./useApiQuery-mQnoCtpJ.js";import"./api-BEJchXjA.js";import"./mykaPromises-CARilZxi.js";import"./policyProductType-BD61ZnUx.js";import"./transit-insurance-DHaUSpuL.js";import"./fire-BtgY-J44.js";import"./savings-BJUwUGln.js";import"./routes-BR5I3bEX.js";import"./annuity-retirement-C1dZ1QHM.js";import"./health-ped-DAki1cTK.js";import"./professional-indemnity-Cx_HID73.js";import"./property-building-content-BPs_xKUv.js";import"./property-business-assets-DHEXMjWx.js";import"./property-home-content-BS-RQEdB.js";import"./savings-specialized-hA4moY7S.js";import"./savings-targeted-goals-BG697KhM.js";import"./underwriterLogoDisplay-B0FBG3Nn.js";import"./UnderwriterPlanLogo-CdMcnE2i.js";import"./deviceBrandLogos-CnwfDF74.js";import"./useUploader-CBNPOY8T.js";import"./CarLogo-DqMBPg2N.js";import"./cancelled-Dfzba4Al.js";import"./verification_mark-CJRfnqWz.js";import"./DropdownPopover-KjBTPKBF.js";import"./SelectField-B8rkxDSz.js";import"./contributionPeriods-BVOAzSfZ.js";const ze=({deadline:t})=>e.jsxs(g,{gap:3,align:"flex-start",px:5,py:4,borderRadius:"xl",bg:r.peach[50],border:`1px solid ${r.peach[200]}`,children:[e.jsx(U,{size:20,color:r.orange[500],style:{flexShrink:0,marginTop:"2px"}}),e.jsxs(o,{fontSize:"sm",color:r.text.tertiary,lineHeight:"1.6",children:[e.jsx(o,{as:"span",fontWeight:"bold",color:r.orange[500],children:"UNDER ACTIVE REVIEW"}),e.jsx("br",{}),"Your claim is being reviewed by our underwriting team. Expected decision by"," ",e.jsxs(o,{as:"span",fontWeight:"bold",color:r.text.label,children:[t,"."]})]})]}),We=({status:t})=>t==="completed"?e.jsx(te,{size:22,color:r.success[500]}):t==="in_progress"?e.jsx(U,{size:22,color:r.orange[500]}):e.jsx(ie,{size:22,color:r.gray[400]}),Ae=({items:t})=>e.jsxs(B,{size:"md",style:{border:`1px solid ${r.gray[200]}
1`,backgroundColor:r.white.DEFAULT,boxShadow:"0px 1px 3px 0px rgba(0,0,0,0.06), 0px 1px 2px -1px rgba(0,0,0,0.04)"},children:[e.jsx(ue,{borderBottom:"1px solid",borderColor:r.gray[100],children:e.jsxs(g,{gap:2,p:4,children:[e.jsx(l,{p:2,bg:r.orange[50],borderRadius:"md",display:"flex",alignItems:"center",justifyContent:"center",children:e.jsx(re,{size:22,color:r.orange[500]})}),e.jsx(o,{fontSize:"md",fontWeight:"semibold",color:r.text.label,children:"What's Being Reviewed?"})]})}),e.jsx(E,{p:5,children:e.jsx(p,{gap:4,children:t.map(i=>e.jsxs(h,{gap:3,align:"flex-start",children:[e.jsx(l,{flexShrink:0,mt:.5,children:e.jsx(We,{status:i.status})}),e.jsxs(l,{children:[e.jsx(o,{fontSize:"md",fontWeight:"semibold",color:i.status==="pending"?r.text.info:r.text.label,children:i.label}),i.description&&e.jsx(o,{fontSize:"sm",color:i.status==="in_progress"?r.orange[500]:r.text.info,mt:.5,lineHeight:"1.4",children:i.description})]})]},i.label))})})]}),Re=({claimReference:t,onVisitHelpCenter:i})=>{const s=()=>{N()};return e.jsxs(h,{justify:"space-between",align:{base:"stretch",sm:"flex-start"},gap:4,wrap:"wrap",direction:{base:"column",sm:"row"},children:[e.jsxs(p,{gap:2,flex:"1",minW:0,children:[e.jsx(o,{fontSize:{base:"xl",md:"2xl"},fontWeight:"bold",color:r.text.primary,lineHeight:"short",wordBreak:"break-word",children:`Claim #${t}`}),e.jsxs(g,{gap:1.5,align:"flex-start",mt:-2,color:r.text.info,minW:0,children:[e.jsx(l,{flexShrink:0,pt:.5,children:e.jsx(oe,{size:16,"aria-hidden":!0})}),e.jsx(o,{fontSize:"sm",color:"#64748B",fontWeight:"medium",wordBreak:"break-word",children:"Reference number for this claim"})]})]}),e.jsxs(p,{direction:{base:"column",sm:"row"},gap:3,flexShrink:0,justify:{base:"stretch",sm:"flex-end"},align:{base:"stretch",sm:"center"},w:{base:"full",sm:"auto"},ml:{base:0,sm:"auto"},children:[e.jsx(w,{type:"button",buttonType:"primary",text:"Talk to Myka",size:"sm",icon:e.jsx(se,{size:18}),iconPosition:"left",onClick:s,w:{base:"full",sm:"auto"}}),e.jsx(w,{type:"button",buttonType:"outline",text:"Help center",size:"sm",icon:e.jsx(M,{size:18,color:r.orange[500]}),iconPosition:"right",onClick:i,w:{base:"full",sm:"auto"},style:{border:`1px solid ${r.gray[200]}`,color:r.text.label}})]})]})},De=({onVisitHelpCenter:t})=>e.jsx(B,{size:"md",style:{marginTop:"1rem",backgroundColor:"#F8FAFC"},children:e.jsxs(E,{p:5,display:"flex",flexDirection:"column",alignItems:"flex-start",children:[e.jsx(o,{fontSize:"md",fontWeight:"semibold",color:r.text.primary,mb:1,children:"Need Help?"}),e.jsx(o,{fontSize:"sm",color:r.text.info,mb:3,lineHeight:"1.5",children:"Questions about the review process? Our team is here to assist."}),e.jsx(w,{buttonType:"add",size:"sm",text:"Visit Help Center",icon:e.jsx(M,{size:14}),iconPosition:"right",onClick:t,px:0})]})}),Te=({claim:t})=>{const s=[{label:"Underwriter",value:fe(t.policyUnderwriter)?ge(t.policyUnderwriter):"N/A"},{label:"Annual premium",value:t.policyPremiumDisplay??"N/A"}];return e.jsxs(l,{bg:r.gray[50],borderRadius:"lg",p:4,children:[e.jsx(o,{fontSize:"sm",fontWeight:"semibold",color:r.text.primary,mb:3,children:"Quick Summary"}),e.jsx(p,{gap:2,children:s.map((a,m)=>e.jsxs(l,{children:[e.jsxs(h,{justify:"space-between",align:"center",gap:3,minW:0,children:[e.jsx(o,{fontSize:"xs",color:r.text.info,flexShrink:0,children:a.label}),e.jsx(o,{fontSize:"xs",fontWeight:"semibold",color:r.text.primary,textAlign:"right",children:a.value})]}),m<s.length-1&&e.jsx(W,{mt:2,borderColor:r.gray[200]})]},a.label))})]})},v=({label:t,value:i,truncate:s})=>e.jsxs(l,{minW:s?0:void 0,children:[e.jsx(o,{fontSize:"xs",color:r.text.info,mb:.5,children:t}),e.jsx(o,{fontSize:"sm",fontWeight:"medium",color:r.text.label,lineHeight:"short",wordBreak:s?void 0:"break-word",truncate:s,title:s?i:void 0,children:i})]}),Ie=t=>t.trim().replace(/_/g," ").toLowerCase().replace(/\b\w/g,i=>i.toUpperCase()),Pe=({claim:t,statusLabel:i,statusColors:s,onVisitHelpCenter:a})=>{const m=q(t.status),d=t.insuranceType.toLowerCase(),b=z.find(x=>x.id===d)??z.find(x=>x.id==="others"),n=b?.icon??V,c=t.vehicleSnapshot,j=[];if(c){c.year!=null&&Number.isFinite(Number(c.year))&&j.push({label:"Year",value:String(c.year)});const x=c.plateNumber?.trim();x&&j.push({label:"Plate number",value:x});const y=c.color?.trim();y&&j.push({label:"Color",value:y});const f=c.chassisNumber?.trim();f&&j.push({label:"Chassis number",value:f});const S=c.make?.trim();S&&j.push({label:"Make",value:S})}return e.jsxs(p,{gap:4,children:[e.jsx(o,{fontSize:"sm",fontWeight:"semibold",color:r.text.primary,children:"Claim status"}),e.jsxs(l,{borderRadius:"xl",border:"1px solid",borderColor:r.border.primary,bg:r.white.DEFAULT,overflow:"hidden",children:[e.jsx(l,{bg:s.bg,border:"1px solid",borderColor:s.color,borderRadius:"xl",px:4,pt:4,pb:4,m:3,children:e.jsxs(h,{justify:"space-between",align:"flex-start",ga
1p:3,minW:0,children:[e.jsxs(p,{gap:2,flex:"1",minW:0,children:[e.jsxs(g,{gap:2,align:"center",children:[e.jsx(l,{w:2,h:2,borderRadius:"full",bg:s.color,flexShrink:0}),e.jsx(o,{fontSize:"md",fontWeight:"bold",color:s.color,children:i})]}),e.jsx(o,{fontSize:"sm",color:r.text.primary,lineHeight:"short",children:m})]}),e.jsx(l,{w:12,h:12,borderRadius:"lg",background:b?.gradient??r.gray[200],borderWidth:1,borderColor:b?.borderColor??r.gray[300],display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:e.jsx(F,{src:n,alt:"",boxSize:7,objectFit:"contain"})})]})}),e.jsxs(p,{gap:4,px:4,pb:4,children:[e.jsxs(C,{columns:{base:1,sm:2},gap:3,w:"full",children:[e.jsx(v,{label:"Reported",value:t.dateReported}),e.jsx(v,{label:"Last updated",value:t.updatedAtDisplay??t.date}),t.engineClaimId?e.jsx(v,{label:"Engine reference",value:t.engineClaimId,truncate:!0}):null,t.policyStatusRaw?e.jsx(v,{label:"Policy status",value:Ie(t.policyStatusRaw)}):null]}),j.length>0?e.jsxs(l,{px:3,py:3,bg:r.gray[50],borderRadius:"lg",border:"1px solid",borderColor:r.gray[200],children:[e.jsx(o,{fontSize:"xs",color:r.text.info,mb:2,children:"Vehicle on policy"}),e.jsx(C,{columns:{base:1,sm:2},gap:3,w:"full",children:j.map(x=>e.jsx(v,{label:x.label,value:x.value},x.label))})]}):null,e.jsx(Te,{claim:t}),e.jsx(De,{onVisitHelpCenter:a})]})]})]})},He=({doc:t})=>{const i=t.type==="pdf";return e.jsxs(g,{gap:3,p:3,borderRadius:"lg",border:`1px solid ${r.gray[100]}`,bg:r.white.DEFAULT,children:[e.jsx(h,{w:10,h:10,borderRadius:"lg",bg:i?r.error[50]:r.navy[50],align:"center",justify:"center",flexShrink:0,children:i?e.jsx(le,{size:20,color:r.error[500]}):e.jsx(ne,{size:20,color:r.navy[400]})}),e.jsxs(l,{flex:"1",minW:0,children:[e.jsx(o,{fontSize:"sm",fontWeight:"medium",color:r.text.label,truncate:!0,children:t.name}),e.jsxs(o,{fontSize:"xs",color:r.text.info,children:[t.size," ⢠Uploaded ",t.uploadedDate]})]})]})},Be=({documents:t,onAddDocument:i,onUploadDocument:s})=>t.length===0?null:e.jsxs(l,{borderRadius:"xl",border:"1px solid",borderColor:"#D8E4EF",bg:"#ffffff",px:4,py:4,children:[e.jsxs(h,{justify:"space-between",align:"center",mb:4,children:[e.jsx(g,{gap:2,children:e.jsx(o,{fontSize:"md",fontWeight:"bold",color:r.text.primary,children:"Claim documents"})}),i?e.jsx(ae,{size:16,cursor:"pointer",fontWeight:"medium",color:r.orange[500],onClick:i,"aria-label":"Add document"}):null]}),t.length===0?e.jsx(o,{fontSize:"sm",color:r.text.info,mb:4,children:"No documents uploaded yet."}):e.jsx(p,{gap:3,mb:4,children:t.map(a=>e.jsx(He,{doc:a},a.id))}),e.jsx(h,{justify:"center",align:"center",pt:t.length>0?4:0,borderTop:t.length>0?`1px dashed ${r.gray[200]}`:void 0,children:e.jsx(w,{buttonType:"outline",size:"sm",disabled:!0,text:"Upload document",onClick:s,fullWidth:!0})})]}),u=({label:t,value:i})=>{const s=i||"N/A";return e.jsxs(l,{minW:0,children:[e.jsx(o,{fontSize:"sm",fontWeight:"medium",color:r.text.subtle,mb:1,children:t}),e.jsx(o,{fontSize:"md",fontWeight:"medium",color:r.text.primary,lineClamp:4,title:s,children:s})]})},Ee=t=>t.trim().replace(/_/g," ").toLowerCase().replace(/\b\w/g,i=>i.toUpperCase()),Ne=({claim:t})=>{const i=()=>{const d=t.insuranceType.toLowerCase(),b=z.find(f=>f.id===d)??z.find(f=>f.id==="others"),n=b?.icon??V,c=t.vehicleSnapshot,x=(c?.make!=null&&String(c.make).trim()?[c.year!=null&&Number.isFinite(Number(c.year))?String(c.year):null,String(c.make).trim(),c.model!=null&&String(c.model).trim()?String(c.model).trim():null].filter(Boolean).join(" "):null)||t.coveredItem,y=t.policyUnderwriterProductName?.trim()||D(t.claimType);return e.jsxs(g,{gap:3,align:"flex-start",w:"full",minW:0,children:[e.jsx(l,{w:14,h:14,borderRadius:"lg",background:b?.gradient??r.gray[200],borderWidth:1,borderColor:b?.borderColor??r.gray[300],display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:e.jsx(F,{src:n,alt:"",boxSize:9,objectFit:"contain"})}),e.jsxs(L,{align:"flex-start",gap:0,minW:0,children:[e.jsx(o,{fontSize:"md",fontWeight:"semibold",color:r.text.primary,lineHeight:"short",wordBreak:"break-word",children:x}),e.jsx(o,{fontSize:"sm",color:r.text.info,lineClamp:3,children:y})]})]})},s=D(t.policyProductTypeRaw??t.claimType),a=t.hasDeclaredAmount?je(t.amount):"Not specified yet",m=t.policyStartDateDisplay&&t.policyEndDateDisplay?`${t.policyStartDateDisplay} â ${t.policyEndDateDisplay}`:t.policyStartDateDisplay??t.policyEndDateDisplay??"N/A";return e.jsx(l,{borderRadius:"xl",border:"1px solid",borderColor:r.border.primary,bg:r.white.DEFAULT,px:{base:4,md:5},py:{base:4,md:5},maxW:"100%",minW:0,overflow:"hidden",children:e.jsxs(p,{gap:5,align:"stretch",children:[e.jsxs(l,{children:[e.jsx(o,{fontSize:"md",fontWeight:"bold",color:r.text.primary,children:"Claim information"}),e.jsx(W,{mt:3,borderColor:"rgba(0,0,0,0.06)"})]}
1),e.jsx(l,{w:"full",children:t.linkedPolicy?e.jsx(ye,{policy:t.linkedPolicy}):i()}),e.jsxs(C,{columns:{base:1,md:t.motorCoverTypeDisplay?3:2},gap:{base:4,md:8},children:[e.jsx(u,{label:"Insurance product",value:s}),e.jsx(u,{label:"Claim type",value:D(t.claimType)}),t.motorCoverTypeDisplay?e.jsx(u,{label:"Cover type",value:t.motorCoverTypeDisplay}):null]}),e.jsxs(C,{columns:{base:1,md:3},gap:{base:4,md:8},children:[e.jsxs(l,{minW:0,children:[e.jsx(o,{fontSize:"sm",fontWeight:"medium",color:r.text.subtle,mb:1,children:"Incident date"}),e.jsxs(g,{gap:2,minW:0,align:"center",children:[e.jsx(ce,{size:18,color:r.orange[500],style:{flexShrink:0},"aria-hidden":!0}),e.jsx(o,{fontSize:"md",fontWeight:"medium",color:r.text.primary,children:t.incidentDate})]})]}),e.jsx(u,{label:"Incident time",value:t.incidentTime??"N/A"}),e.jsx(u,{label:"Incident location",value:t.incidentLocation??"N/A"})]}),e.jsxs(C,{columns:{base:1,md:3},gap:{base:4,md:8},children:[e.jsx(u,{label:"Incident type",value:t.incidentTypesDisplay??"N/A"}),e.jsx(u,{label:"Claim amount",value:a}),e.jsx(u,{label:"Reported on",value:t.dateReported})]}),e.jsxs(C,{columns:{base:1,md:3},gap:{base:4,md:8},children:[e.jsx(u,{label:"Policy number",value:t.policyNumber?.trim()||"N/A"}),e.jsx(u,{label:"Myka policy ref.",value:t.policyOurReference??"N/A"}),e.jsx(u,{label:"Policy period",value:m})]}),e.jsxs(C,{columns:{base:1,md:3},gap:{base:4,md:8},children:[t.policyStatusRaw?e.jsx(u,{label:"Policy status",value:Ee(t.policyStatusRaw)}):e.jsx(u,{label:"Policy status",value:"N/A"}),e.jsx(Ce,{underwriterName:t.policyUnderwriter?.trim()??""}),e.jsx(u,{label:"Annual premium",value:t.policyPremiumDisplay??"N/A"})]}),t.description?e.jsxs(l,{borderRadius:"lg",bg:r.gray[50],border:"1px solid",borderColor:r.gray[200],px:4,py:3,children:[e.jsx(o,{fontSize:"sm",fontWeight:"medium",color:r.text.subtle,mb:2,children:"Description"}),e.jsx(o,{fontSize:"md",color:r.text.primary,lineHeight:"1.5",children:t.description})]}):null]})})},Ue=t=>{const i=t.trim();if(i)try{const s=new URL(i);if(s.protocol!=="http:"&&s.protocol!=="https:")return;window.open(i,"_blank","noopener,noreferrer")}catch{}},Me=({claim:t})=>{const i=t.policyMykaCertificateUrl?.trim(),s=t.policyCertificateUrl?.trim(),a=!!i,m=(i||s)??"",d=!!m;return e.jsxs(l,{borderRadius:"xl",border:"1px solid",borderColor:"#D8E4EF",bg:"#ffffff",px:4,py:4,children:[e.jsx(h,{justify:"space-between",align:"center",mb:4,children:e.jsxs(g,{gap:2,children:[e.jsx(o,{fontSize:"md",fontWeight:"bold",color:r.text.primary,children:"Policy Documents"}),d?e.jsx(o,{fontSize:"xs",fontWeight:"bold",color:r.text.info,bg:r.white.DEFAULT,px:2,py:.5,borderRadius:"full",border:"1px solid",borderColor:r.gray[200],children:"1"}):null]})}),d?e.jsxs(h,{direction:{base:"column",sm:"row"},justify:"space-between",align:{base:"stretch",sm:"center"},py:3,gap:3,children:[e.jsxs(g,{gap:3,flex:"1",minW:0,children:[e.jsx(l,{w:10,h:10,borderRadius:"md",bg:r.error[50],display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:e.jsx(de,{size:22,color:r.error[500]})}),e.jsx(l,{minW:0,children:e.jsx(o,{fontSize:"sm",fontWeight:"semibold",color:r.text.primary,truncate:!0,children:"Policy Certificate"})})]}),e.jsx(w,{type:"button",buttonType:"primary",text:"Download",icon:e.jsx(me,{size:22}),disabled:!m,"aria-label":`Download ${a?"Myka certificate":"certificate"}`,onClick:()=>Ue(m),w:{base:"full",sm:"auto"},alignSelf:{base:"stretch",sm:"center"},flexShrink:0})]}):e.jsx(o,{fontSize:"sm",color:r.text.info,py:2,children:"No certificate links are available for this policy yet."})]})},Fe=({claim:t})=>{const i=t.policyCoverageGroups.filter(s=>s.items.length>0);return e.jsx(l,{borderRadius:"xl",border:"1px solid",borderColor:"#D8E4EF",bg:"#ffffff",px:4,py:4,children:e.jsx(ke,{defaultOpen:!1,label:e.jsx(o,{fontSize:"md",fontWeight:"bold",color:r.text.primary,children:"What is covered"}),children:i.length>0?e.jsx(p,{gap:4,children:i.map((s,a)=>e.jsxs(l,{children:[s.title?e.jsx(o,{fontSize:"sm",fontWeight:"bold",color:r.text.primary,mb:1,children:s.title}):null,e.jsx(p,{gap:0,children:s.items.map((m,d)=>e.jsxs(l,{py:3,children:[e.jsx(o,{fontSize:"sm",fontWeight:"semibold",color:r.text.primary,children:m.name}),e.jsx(o,{fontSize:"sm",color:r.text.info,mt:1,children:m.description}),d<s.items.length-1?e.jsx(W,{mt:3,borderColor:"rgba(0,0,0,0.06)"}):null]},`${m.name}-${d}`))})]},`${s.title??"group"}-${a}`))}):e.jsx(o,{fontSize:"sm",color:r.text.info,lineHeight:"1.5",children:"No itemised coverage list was returned for this policy"})})})},Le=({name:t,phone:i,onCall:s})=>e.jsxs(l,{borderRadius:"xl",border:"1px solid",borderColor:r.border.primary,bg:r.gray[50],px:4,py:4,children:[e.jsx(o,{fontSize:"md",fontWeight:"semibold",color:r.text.label,mb:3,children:"Talk to Myka"}),e.jsxs(h,{align:"center",gap:3,bg:r.white.DEFAULT,p:3,borderRadius:"full",border:".5px solid",borderColor:r.border.primary,children:[e.jsx(l,{flexShrink:0,children:e.jsx(Q,{initial:"",size:"lg"})}),e.jsxs(l,{flex:"1",minW:0,children:[e.jsx(o,{fontSize:"sm",fontWeight:"bold",color:r.text.label,lineHeight:"short",children:t}),e.jsx(o,{fontSize:"sm",color:r.text.info,children:i})]}),e.jsx(g,{gap:2,flexShrink:0,children:e.jsx(w,{type:"button",buttonType:"text",icon:e.jsx(xe,{size:21,color:r.success[500]}),onClick:s,"aria-label":"Call support",w:12,h:12,minW:12,p:0,lineHeight:"1",borderRadius:"full",bg:r.success[50],_hover:{bg:r.success[100],transform:"translateY(-1px)",boxShadow:"sm"},_active:{bg:r.success[200],transform:"translateY(0)"}})})]})]}),Ve=({step:t,isLast:i})=>{const s=t.status==="completed",a=t.status==="in_progress",m=t.status==="pending",d=s?r.success[500]:a?r.orange[500]:"transparent",b=s?r.success[400]:r.gray[200];return e.jsxs(h,{gap:4,position:"relative",children:[e.jsxs(h,{direction:"column",align:"center",flexShrink:0,children:[e.jsx(l,{w:6,h:6,borderRadius:"full",border:m?`2px solid ${r.gray[300]}`:"none",bg:d,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,mt:.5,children:s&&e.jsx(pe,{size:14,color:r.white.DEFAULT})}),!i&&e.jsx(l,{w:"2px",flex:"1",minH:10,bg:b,mt:1})]}
1),e.jsxs(L,{align:"flex-start",gap:.5,pb:i?0:5,flex:"1",minW:0,children:[e.jsx(o,{fontSize:"md",fontWeight:"semibold",color:m?r.text.info:r.text.label,children:t.label}),t.description&&e.jsx(o,{fontSize:"sm",color:r.text.info,lineHeight:"1.5",children:t.description}),t.timestamp&&e.jsx(o,{fontSize:"sm",color:a?r.text.info:r.success[600],lineHeight:"1.4",mt:.5,children:t.timestamp})]})]})},_e=({steps:t})=>e.jsx(l,{borderRadius:"xl",border:"1px solid",borderColor:r.border.primary,bg:r.white.DEFAULT,px:{base:4,md:5},py:{base:4,md:5},maxW:"100%",minW:0,overflow:"hidden",children:e.jsxs(p,{gap:5,align:"stretch",children:[e.jsxs(l,{children:[e.jsx(o,{fontSize:"md",fontWeight:"bold",color:r.text.primary,children:"Review timeline"}),e.jsx(W,{mt:3,borderColor:"rgba(0,0,0,0.06)"})]}),e.jsx(p,{gap:0,children:t.map((i,s)=>e.jsx(Ve,{step:i,isLast:s===t.length-1},i.label))})]})}),Br=()=>{const t=K(),{id:i}=Y(),s=i?.trim()??"",{data:a,isLoading:m,error:d,refetch:b}=X(s),n=R.useMemo(()=>!a?.success||!a.data?null:Z(a.data),[a]),c=n?ee[n.status]:"",j=n?H[n.status]:H.DRAFT,x=()=>{t(-1)},y=()=>{t(`/${J.claims}`)},f=R.useMemo(()=>[{labelKey:"Claims",isActive:!1},{labelKey:"Details",isActive:!0}],[]),S=()=>{t("/support")},_=()=>{window.location.href=`tel:${P.replace(/\s/g,"")}`},$=()=>{N()},A=n?.claimNumber?.trim()||"â",G=R.useMemo(()=>[{labelKey:"Claims",isActive:!1},{labelKey:A,isActive:!0}],[A]);if(!s)return e.jsx(k,{items:f,onGoBack:x,contentMaxW:"1100px",children:e.jsx(l,{maxW:"560px",mx:"auto",w:"full",children:e.jsx(T,{variant:"claim-missing-id",onViewAllClaims:y,viewAllClaimsButtonText:"Back to claims"})})});if(m&&!n)return e.jsx(k,{items:f,onGoBack:x,contentMaxW:"1100px",children:e.jsx(h,{justify:"center",align:"center",minH:"50vh",children:e.jsx(he,{size:"xl",color:r.orange[500]})})});if(d){const O=(d&&typeof d=="object"&&"response"in d&&typeof d.response?.status=="number"?d.response.status:void 0)===404,I=we(d);return e.jsx(k,{items:f,onGoBack:x,contentMaxW:"1100px",children:e.jsx(l,{maxW:"560px",mx:"auto",w:"full",children:e.jsx(T,{variant:O?"claim-not-found":"claim-load-error",...I?{errorMessage:I}:{},onRetry:()=>{b()},onViewAllClaims:y,viewAllClaimsButtonText:"Back to claims"})})})}return n?e.jsx(k,{items:G,onGoBack:x,contentMaxW:"1100px",children:e.jsxs(p,{gap:5,align:"stretch",minW:0,w:"full",pb:{base:4,md:10},children:[e.jsx(l,{border:"1px solid",borderColor:r.border.primary,borderRadius:"xl",p:{base:4,md:6},maxW:"100%",minW:0,overflow:"hidden",children:e.jsxs(p,{gap:6,minW:0,align:"stretch",children:[e.jsx(Re,{claimReference:A,onVisitHelpCenter:S}),e.jsxs(be,{templateColumns:{base:"1fr",lg:"1fr 340px"},gap:{base:6,lg:8},alignItems:"start",minW:0,w:"full",children:[e.jsxs(p,{gap:5,minW:0,align:"stretch",children:[e.jsx(Ne,{claim:n}),e.jsx(Me,{claim:n}),e.jsx(Fe,{claim:n}),e.jsx(Be,{documents:n.documents}),e.jsx(_e,{steps:n.tracker}),n.activeReviewDeadline?e.jsx(ze,{deadline:n.activeReviewDeadline}):null,n.reviewItems&&n.reviewItems.length>0?e.jsx(Ae,{items:n.reviewItems}):null]}),e.jsx(l,{position:{base:"static",lg:"sticky"},top:"88px",children:n.linkedPolicy?e.jsx(Se,{policy:n.linkedPolicy,onTalkToAgent:$,onVisitHelpCenter:S}):e.jsx(Pe,{claim:n,statusLabel:c,statusColors:j,onVisitHelpCenter:S})})]})]})}),e.jsx(Le,{name:ve.name,phone:P,onCall:_})]})}):e.jsx(k,{items:f,onGoBack:x,contentMaxW:"1100px",children:e.jsx(l,{maxW:"560px",mx:"auto",w:"full",children:e.jsx(T,{variant:"claim-not-found",onViewAllClaims:y,viewAllClaimsButtonText:"Back to claims"})})})};export{Br 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.