1import{j as e}from"./react-core-cYov6Rvm.js";import{b as n,S as m,C as c,j as x}from"./index-Ckpyapbo.js";import{u as o}from"./use-page-title-DjkQhpo9.js";import{a8 as h}from"./vendor-NJ098SeL.js";import{S as g,aH as p,an as u}from"./icons-Tf2Vd4NW.js";import"./tanstack-CDSksQP7.js";import"./ui-primitives-3TkGG8_c.js";import"./dates-Cjo9ipWX.js";import"./forms-3CKo-M3B.js";const i={BRONZE:{bg:"from-orange-600 to-orange-800",text:"text-orange-100",accent:"bg-orange-500/20"},SILVER:{bg:"from-gray-500 to-gray-700",text:"text-gray-100",accent:"bg-gray-400/20"},GOLD:{bg:"from-yellow-500 to-yellow-700",text:"text-yellow-100",accent:"bg-yellow-400/20"},APEX:{bg:"from-purple-600 to-purple-900",text:"text-purple-100",accent:"bg-purple-400/20"}};function C(){o("Member ID");const{user:t,isLoading:r}=n();if(r)return e.jsx("div",{className:"p-6 max-w-md mx-auto",children:e.jsx(m,{className:"h-64 rounded-xl"})});if(!t)return null;const a=t.memberStatus?.tier||"BRONZE",s=i[a]||i.BRONZE,l=t.memberStatus?.eligible!==!1,d=`${window.location.origin}/verify/${t.id}`;return e.jsxs("div",{className:"p-6 max-w-md mx-auto space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight","data-testid":"text-member-id-title",children:"Digital ID"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Your Fortis membership card"})]}),e.jsxs("div",{className:`rounded-xl bg-gradient-to-br ${s.bg} p-6 shadow-lg`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:`flex h-8 w-8 items-center justify-center rounded-md ${s.accent}`,children:e.jsx(g,{className:"h-4 w-4 text-white"})}),e.jsx("span",{className:"text-white font-bold text-sm tracking-wider",children:"FORTIS HUB"})]}),e.jsx("div",{className:`px-3 py-1 rounded-full ${s.accent}`,children:e.jsx("span",{className:"text-white text-xs font-semibold tracking-wider","data-testid":"text-id-tier",children:a})})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("p",{className:"text-white/60 text-xs uppercase tracking-wider mb-1",children:"Member Name"}),e.jsx("p",{className:"text-white text-lg font-bold","data-testid":"text-id-name",children:t.name})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{className:"text-white/60 text-xs uppercase tracking-wider mb-1",children:"Status"}),e.jsx("div",{className:"flex items-center gap-2",children:l?e.jsxs(e.Fragment,{children:[e.jsx(p,{className:"h-4 w-4 text-green-300"}),e.jsx("span",{className:"text-green-300 text-sm font-semibold","data-testid":"text-id-status",children:"Eligible"})]}):e.jsxs(e.Fragment,{children:[e.jsx(u,{className:"h-4 w-4 text-red-300"}),e.jsx("span",{className:"text-red-300 text-sm font-semibold","data-testid":"text-id-status",children:"Not Eligible"})]})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-white/60 text-xs uppercase tracking-wider mb-1",children:"Region"}),e.jsx("p",{className:"text-white text-sm font-medium","data-testid":"text-id-region",children:t.region})]}),(t.memberStatus?.memberProgram==="LO_ACADEMY"||t.loaPaymentStatus==="ACTIVE"||t.loaPaymentStatus==="PENDING"||t.loaPaymentStatus==="LAPSED")&&e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"text-white/60 text-xs uppercase tracking-wider mb-1",children:"Programme"}),e.jsx("p",{className:"text-white text-sm font-medium","data-testid":"text-id-program",children:"LO Academy Member"})]})]}),e.jsx("div",{className:"flex-shrink-0 rounded-md bg-white p-2","data-testid":"qr-code",children:e.jsx(h,{value:d,size:80,level:"M"})})]})]}),e.jsx(c,{children:e.jsx(x,{className:"p-4",children:e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Present this QR code to partner establishments for live verification. Partners will see your name, tier, and eligibility status only â no scores or history are shared."})})})]})}export{C 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.