1import{d as p,g as k,T as g,r as N,j as e,U as h,F as u,aG as x}from"./index-jOxk7ZTv.js";import{u as v,O as j}from"./OrderStatusesTimeline.jYuu7zoU.js";import{P as O}from"./PageHeaderMeta.0FFsnQQX.js";import{S as m}from"./arrow back.8Y0YSs5-.js";const b=()=>{const{t:r}=p(),c=k(),{uid:s}=g(),[a,i]=N.useState(s??""),{isFetching:d,data:n,error:l}=v(s),o=t=>{t.preventDefault(),h.isAuthenticated()?c(`/profile/track-order/${a}`):c(`/track-order/${a}`)};return e.jsxs(e.Fragment,{children:[e.jsx(O,{page_title:r("trackOrder.title")}),h.isAuthenticated()?e.jsx("div",{id:"track-order",children:e.jsxs("div",{className:"section-container",children:[e.jsxs("div",{className:"heading",children:[e.jsx(u,{className:"go-back",to:"/profile",children:e.jsx("button",{children:e.jsx(m,{})})}),e.jsx("h1",{children:r("trackOrder.title")}),e.jsx("p",{className:"sub-title",children:r("trackOrder.subTitle")})]}),e.jsxs("form",{onSubmit:o,className:"search-input",children:[e.jsxs("div",{className:"input-container",children:[a.length>1&&e.jsx("p",{className:"label-input",children:r("trackOrder.inputLabel")}),e.jsx("input",{type:"text",placeholder:r("trackOrder.inputPlaceholder"),value:a,onChange:t=>i(t.target.value)})]}),e.jsx("button",{children:e.jsx(x,{})})]}),s&&(l?e.jsx("h3",{className:"not-found",children:r("trackOrder.notFound")}):s&&d?e.jsx("h3",{className:"not-found",children:r("trackOrder.loading")}):n&&e.jsx(j,{orderStatusChanges:n}))]})}):e.jsxs("div",{className:"track-order-main",children:[e.jsx("div",{className:"go-back",children:e.jsx(u,{to:"/",children:e.jsx("button",{children:e.jsx(m,{})})})}),e.jsx("div",{id:"track-order",className:"track-order-guest",children:e.jsxs("div",{className:"section-container",children:[e.jsxs("div",{className:"heading",children:[e.jsx("h1",{className:"track-order-title",children:r("trackOrder.title")}),e.jsx("p",{className:"sub-title",children:r("trackOrder.subTitle")})]}),e.jsxs("form",{onSubmit:o,className:"search-input",children:[e.jsxs("div",{className:"input-container",children:[a.length>1&&e.jsx("p",{className:"label-input",children:r("trackOrder.inputLabel")}),e.jsx("input",{type:"text",placeholder:r("trackOrder.inputPlaceholder"),value:a,onChange:t=>i(t.target.value)})]}),e.jsx("button",{children:e.jsx(x,{})})]}),s&&(l?e.jsx("h3",{className:"not-found",children:r("trackOrder.notFound")}):s&&d?e.jsx("h3",{className:"not-found",children:r("trackOrder.loading")}):n&&e.jsx(j,{orderStatusChanges:n}))]})})]})]})};b.propTypes={};export{b 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.