1import{j as e}from"./vendor-react-C-tLJ3C8.js";import{p as n,g as o,h as m}from"./motion-BZ9X7-6B.js";import{g as c}from"./useMarketer-HQVcYvF-.js";import{C as x}from"./Card-CD2rnSRu.js";import{B as p}from"./Badge-p3wyzqIi.js";import{S as u}from"./Spinner-DMCmgwQ4.js";import{v as g}from"./index-DxoJEjRy.js";import{C as b}from"./circle-check-big-ajascIVB.js";import{C as h}from"./clock-DR8sLrmU.js";import{m as i}from"./vendor-motion-Dx4K3zup.js";import{U as f}from"./user-BPf9ce2H.js";import"./vendor-query-4BWL3uTy.js";/** 2 * @license lucide-react v0.378.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const y=g("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]),d={pending:{label:"Pending review",variant:"warning",Icon:h},approved:{label:"Approved",variant:"success",Icon:b},suspended:{label:"Suspended",variant:"danger",Icon:y}};function t({label:a,value:s}){return e.jsxs(i.div,{variants:m,className:"flex flex-col sm:flex-row sm:items-center gap-0.5 sm:gap-4 py-3 border-b border-gray-100 dark:border-dark-border last:border-0",children:[e.jsx("dt",{className:"text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wide sm:w-40 shrink-0",children:a}),e.jsx("dd",{className:"text-sm text-gray-900 dark:text-white",children:s??e.jsx("span",{className:"italic text-gray-400 dark:text-gray-500",children:"â"})})]})}function T(){const{data:a,isLoading:s,isError:l}=c(),r=a?d[a.status]??d.pending:null;return e.jsxs(i.div,{variants:n,initial:"initial",animate:"animate",exit:"exit",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Profile"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:"Your Sales Rep account details."})]}),s&&e.jsx("div",{className:"flex items-center justify-center py-24",children:e.jsx(u,{size:"lg"})}),l&&e.jsx("div",{role:"alert",className:"rounded-xl border border-red-200 dark:border-red-900/40 bg-red-50 dark:bg-red-900/20 p-4 text-sm text-red-800 dark:text-red-200",children:"Could not load your profile. Please refresh the page."}),a&&r&&e.jsxs("div",{className:"max-w-2xl space-y-5",children:[a.status!=="approved"&&e.jsxs("div",{role:"status",className:`flex items-start gap-3 rounded-xl border p-4 text-sm ${a.status==="pending"?"border-amber-200 dark:border-amber-900/40 bg-amber-50 dark:bg-amber-900/20 text-amber-800 dark:text-amber-200":"border-red-200 dark:border-red-900/40 bg-red-50 dark:bg-red-900/20 text-red-800 dark:text-red-200"}`,children:[e.jsx(r.Icon,{className:"w-4 h-4 shrink-0 mt-0.5","aria-hidden":!0}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold",children:r.label}),a.status==="pending"&&e.jsx("p",{className:"mt-0.5 text-xs",children:"Your application is under review. We'll notify you by email once approved â usually within 2 â 3 business days."}),a.status==="suspended"&&e.jsx("p",{className:"mt-0.5 text-xs",children:"Your account has been suspended. Contact ExamPadi support for more information."})]})]}),e.jsxs(x,{variant:"default",padding:"md",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-5",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-primary-100 dark:bg-primary-900/30 flex items-center justify-center shrink-0",children:e.jsx(f,{className:"w-7 h-7 text-primary-700 dark:text-primary-400","aria-hidden":!0})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:a.fullName}),e.jsx(p,{variant:r.variant,size:"sm",className:"mt-1",children:r.label})]})]}),e.jsxs(i.dl,{variants:o,initial:"initial",animate:"animate",children:[e.jsx(t,{label:"Email",value:a.email}),e.jsx(t,{label:"Phone",value:a.phone}),e.jsx(t,{label:"State",value:a.state}),e.jsx(t,{label:"LGA",value:a.lga}),e.jsx(t,{label:"Member since",value:new Date(a.createdAt).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"})})]})]}),e.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"To update your profile details, contact ExamPadi support."})]})]})}export{T 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.