1import{r as t,a as m,j as s}from"./app-Mnt2IEGe.js";import{G as x}from"./GuestLayout-BYnLiqFZ.js";import{T as p}from"./truck-CpGakV_6.js";import"./ApplicationLogo-JvKRx6b1.js";import"./x-B1Pn9Kmg.js";import"./message-circle-D4MbkUVn.js";import"./phone-DSAsYLtt.js";import"./chevron-down-BlAiga6f.js";import"./user-ad0RTXxq.js";import"./package-CT4joqbC.js";import"./map-pin-BuVEKMGp.js";import"./shopping-cart-DokKNEt4.js";import"./search-BeXkNHdv.js";import"./clock-Dnho5FNh.js";import"./shield-Da3uiB5y.js";import"./mail-Ce-sk81h.js";const u={PP:"Pending Pickup",IT:"In Transit",OFD:"Out for Delivery",DL:"Delivered",EX:"Exception",RT:"Return to Origin","RT-IT":"RTO In Transit","RT-DL":"RTO Delivered"};function L({order:o}){const[r,c]=t.useState(null),[n,l]=t.useState(!0),[a,i]=t.useState(null);return t.useEffect(()=>{m.get(`/order/${o.order_number}/tracking/data`).then(e=>{e.data.success?c(e.data.tracking):i(e.data.message)}).catch(()=>i("Unable to fetch tracking details")).finally(()=>l(!1))},[]),s.jsx(x,{children:s.jsxs("div",{className:"max-w-3xl mx-auto py-10 px-4",children:[s.jsx("h1",{className:"text-2xl font-black mb-6",children:"Track Your Order"}),n&&s.jsx("p",{children:"Loading tracking detailsâ¦"}),a&&s.jsx("p",{className:"text-red-600",children:a}),r&&s.jsxs("div",{className:"bg-white border rounded-2xl p-6 shadow",children:[s.jsxs("p",{className:"mb-4",children:[s.jsx("strong",{children:"AWB:"})," ",r.awb_number]}),s.jsx("div",{className:"space-y-4",children:r.history.map((e,d)=>s.jsxs("div",{className:"border-l-4 border-[#2e3192] pl-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(p,{className:"w-4 h-4 text-[#2e3192]"}),s.jsx("span",{className:"font-semibold",children:u[e.status_code]||e.status_code})]}),s.jsx("p",{className:"text-sm",children:e.message}),s.jsxs("p",{className:"text-xs text-gray-500",children:[e.location," ⢠",e.event_time]})]},d))})]})]})})}export{L 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.