1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1085],{12108:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},17215:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("ArrowDownLeft",[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]])},61085:(e,t,s)=>{s.r(t),s.d(t,{default:()=>V});var a=s(95155),l=s(12115),n=s(5370),i=s(89715),r=s(75882),c=s(16485),d=s(27937),o=s(5917),x=s(75426),m=s(17215),u=s(7013),h=s(86651),p=s(91169),f=s(52472),g=s(76907),N=s(17181),j=s(24546),b=s(24924),v=s(82915),y=s(53270),w=s(95818);let F=(0,s(71847).A)("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);var k=s(12108),E=s(24033),A=s(35299);let _="text-[10px] font-medium text-[#444746] uppercase tracking-widest font-sans",C={Good:"bg-[#EBF1FF] text-[#0039B5]",Fair:"bg-amber-50 text-amber-700",Damaged:"bg-rose-50 text-rose-700",Missing:"bg-gray-100 text-gray-500"};function S(e){var t,s,n;let{leaseId:i}=e,[r,c]=(0,l.useState)(null),[d,x]=(0,l.useState)(!0),[m,u]=(0,l.useState)(!1),[h,p]=(0,l.useState)(!1);async function f(){if(r){p(!0);try{await (0,b._dX)(r.id),c(null)}catch(e){}finally{p(!1)}}}return((0,l.useEffect)(()=>{if(!i)return void x(!1);(0,b.ep8)(i).then(e=>{let t=e.find(e=>"MOVE_IN"===e.log_type&&!e.tenant_approved);c(null!=t?t:null)}).catch(()=>{}).finally(()=>x(!1))},[i]),d||!r)?null:(0,a.jsxs)("div",{className:"".concat("bg-white rounded-[28px] ring-1 ring-black/[0.06]"," p-5"),children:[(0,a.jsxs)("button",{onClick:()=>u(e=>!e),className:"w-full flex items-center justify-between gap-3 text-left",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-full bg-[#CCE0FF] flex items-center justify-center shrink-0",children:(0,a.jsx)(F,{className:"w-4 h-4 text-[#0039B5]"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:"Move-in inspection ready"}),(0,a.jsxs)("p",{className:"text-xs text-gray-400 truncate",children:[null!=(n=r.created_by_name)?n:"Your property manager"," logged your unit's condition â review and confirm."]})]})]}),m?(0,a.jsx)(k.A,{className:"w-4 h-4 text-gray-400 shrink-0"}):(0,a.jsx)(E.A,{className:"w-4 h-4 text-gray-400 shrink-0"})]}),m&&(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)("div",{className:"h-px bg-black/[0.05] mb-4"}),(null==(t=r.checklist)?void 0:t.length)>0&&(0,a.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,a.jsx)("p",{className:_,children:"Condition checklist"}),r.checklist.map((e,t)=>{var s;return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 bg-[#F1F3F4] rounded-xl px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-900 truncate",children:e.item}),e.notes&&(0,a.jsx)("p",{className:"text-xs text-gray-400 truncate",children:e.notes})]}),(0,a.jsx)("span",{className:"shrink-0 text-[10px] font-semibold px-2 py-1 rounded-full ".concat(null!=(s=C[e.condition])?s:"bg-gray-100 text-gray-500"),children:e.condition})]},t)})]}),(null==(s=r.photos)?void 0:s.length)>0&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("p",{className:"".concat(_," mb-2"),children:"Photos"}),(0,a.jsx)("div",{className:"flex gap-2 overflow-x-auto",children:r.photos.map((e,t)=>{var s;return(0,a.jsx)("img",{src:e.url,alt:null!=(s=e.caption)?s:"Inspection photo",className:"w-20 h-20 rounded-xl object-cover shrink-0"},t)})})]}),r.notes&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("p",{className:"".concat(_," mb-1"),children:"Notes"}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:r.notes})]}),(0,a.jsx)("p",{className:"text-xs text-gray-400 mb-3",children:"Approving digitally signs off on this record as the condition of your unit at move-in."}),(0,a.jsxs)("button",{onClick:f,disabled:h,className:"w-full flex items-center justify-center gap-2 bg-[#0052FF] hover:bg-[#0039B5] text-white font-semibold text-sm py-3 rounded-full transition-colors disabled:opacity-50",children:[h?(0,a.jsx)(A.A,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(o.A,{className:"w-4 h-4"}),h?"Confirmingâ¦":"Approve & confirm move-in"]})]})]})}var R=s(12109);let D=e=>new Intl.NumberFormat("en-NG",{style:"currency",currency:"NGN",minimumFractionDigits:2,maximumFractionDigits:2,trailingZeroDisplay:"str
1ipIfInteger"}).format(null!=e?e:0),I=e=>e?new Date(e).toLocaleDateString("en-NG",{day:"numeric",month:"short",year:"numeric"}):"â",T={RENT:"Rent payment",TOPUP:"Wallet top-up",SERVICE:"Service fee",SHORTLET:"Shortlet",EVENT_HALL:"Event hall",PAYOUT:"Payout",REFUND:"Refund",INSPECTION:"Inspection",SAVINGS:"Rent savings",SERVICE_CHARGE:"Service charge",SUBSCRIPTION:"Subscription",WITHDRAWAL_FEE:"Withdrawal fee",APPLICATION_FEE:"Application fee",REFERRAL_REWARD:"Referral reward",CAUTION_FEE:"Caution fee",CAUTION_FEE_REFUND:"Caution refund",VACATE_REFUND:"Vacate refund"},M="bg-white rounded-[28px] ring-1 ring-black/[0.06]",P="text-[10px] font-medium text-[#444746] uppercase tracking-widest font-sans";function O(e){let{className:t=""}=e;return(0,a.jsx)("div",{className:"bg-black/[0.06] rounded-lg animate-pulse ".concat(t)})}let U={LOW:{label:"Good Standing",dot:"bg-[#0052FF]",text:"text-[#0039B5]",bar:"bg-[#0052FF]"},MEDIUM:{label:"Needs Attention",dot:"bg-orange-500",text:"text-orange-600",bar:"bg-orange-500"},HIGH:{label:"At Risk",dot:"bg-red-600",text:"text-red-600",bar:"bg-red-600"}};function G(e){var t;let{score:s,level:l}=e;if(null==s||null==l)return null;let n=null!=(t=U[l])?t:U.HIGH;return(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-3 px-3 py-2.5 rounded-xl border border-gray-200 bg-white",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,a.jsx)("span",{className:"w-2 h-2 rounded-full ".concat(n.dot)}),(0,a.jsx)("span",{className:"text-base font-black tabular-nums ".concat(n.text),children:Math.round(s)}),(0,a.jsx)("span",{className:"text-[10px] text-gray-400 font-medium",children:"/100"})]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,a.jsx)("p",{className:"text-[10px] font-semibold text-gray-500 uppercase tracking-widest leading-none",children:"Rent Score"}),(0,a.jsx)("p",{className:"text-[10px] font-bold ".concat(n.text),children:n.label})]}),(0,a.jsx)("div",{className:"h-1 bg-gray-100 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-full ".concat(n.bar),style:{width:"".concat(Math.round(s),"%")}})})]})]})}function L(e){let{days:t,nextDueDate:s}=e;return null==t?s&&0>Math.ceil((new Date(s)-new Date)/864e5)?(0,a.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-md text-[10px] font-bold bg-red-50 text-red-600 border border-red-200",children:"OVERDUE"}):null:0===t?(0,a.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-md text-[10px] font-bold bg-red-50 text-red-600 border border-red-200 animate-pulse",children:"DUE TODAY"}):t<=3?(0,a.jsxs)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-md text-[10px] font-bold bg-orange-50 text-orange-600 border border-orange-200",children:[t,"d left"]}):t<=14?(0,a.jsxs)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-md text-[10px] font-semibold text-gray-500 border border-gray-200",children:[t,"d"]}):(0,a.jsxs)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-md text-[10px] font-semibold text-gray-400 border border-gray-100",children:[t,"d"]})}function V(e){var t,s,F,k,E,A,_,C,U,V,B,H,W,Y,z,q,K,Z,Q,X,$,J,ee,et,es,ea,el,en,ei,er,ec,ed,eo,ex;let{onOpenFunds:em,onOpenRentPrepay:eu,onOpenLeases:eh,onOpenMaintenance:ep,onOpenReferrals:ef,onOpenRentReport:eg,onOpenRentHistory:eN,onDiscovery:ej,onOpenKyc:eb,onOpenEstateAccess:ev}=e,{user:ey,isAuthenticated:ew}=(0,j.useAuthStore)(),eF=(0,R.w)(e=>e.open),[ek,eE]=(0,l.useState)(null),[eA,e_]=(0,l.useState)([]),[eC,eS]=(0,l.useState)([]),[eR,eD]=(0,l.useState)([]),[eI,eT]=(0,l.useState)([]),[eM,eP]=(0,l.useState)(0),[eO,eU]=(0,l.useState)(!0),[eG,eL]=(0,l.useState)(!1),[eV,eB]=(0,l.useState)(null),[eH,eW]=(0,l.useState)(null),[eY,ez]=(0,l.useState)(null),[eq,eK]=(0,l.useState)(!1),[eZ,eQ]=(0,l.useState)(null),[eX,e$]=(0,l.useState)(!1);(0,l.useEffect)(()=>{ew&&(null==ey?void 0:ey.id)&&(0,b.hBr)().then(eQ).catch(()=>{})},[ew,null==ey?void 0:ey.id]),(0,l.useEffect)(()=>{let e=!0;return async function(){var t,s,a,l,n,i,r,c,d,o,x,m,u,h,p,f,g,N,j,v,y,w,F;eU(!0),(0,b.d$K)().then(t=>{var s;e&&eW(null!=(s=null==t?void 0:t.data)?s:null)}
1).catch(()=>{}),(0,b.Lpk)().then(t=>{var s,a,l,n;e&&ez(null!=(n=null!=(l=null==t||null==(s=t.data)?void 0:s.referral_code)?l:null==t||null==(a=t.data)?void 0:a.code)?n:null)}).catch(()=>{});let[k,E,A,_,C,S]=await Promise.allSettled([(0,b.ikD)(),(0,b.PDM)(),(0,b.Sfq)({limit:5}),(0,b.kPt)({limit:5}),(0,b.Z89)(),(0,b.EqQ)({limit:20})]);if(e){if("fulfilled"===k.status&&eE(null!=(s=null==(t=k.value)?void 0:t.data)?s:k.value),"fulfilled"===E.status){let e=null!=(l=null==(a=E.value)?void 0:a.data)?l:E.value;e_(Array.isArray(e)?e:[])}if("fulfilled"===A.status){let e=null!=(o=null!=(d=null!=(c=null==(i=A.value)||null==(n=i.data)?void 0:n.data)?c:null==(r=A.value)?void 0:r.data)?d:A.value)?o:[];eS(Array.isArray(e)?e:[])}if("fulfilled"===_.status){let e=null!=(f=null!=(p=null!=(h=null==(m=_.value)||null==(x=m.data)?void 0:x.data)?h:null==(u=_.value)?void 0:u.data)?p:_.value)?f:[];eD(Array.isArray(e)?e:[])}if("fulfilled"===C.status){let e=C.value;eT(Array.isArray(e)?e:null!=(g=null==e?void 0:e.data)?g:[])}if("fulfilled"===S.status){let e=null!=(F=null!=(w=null!=(y=null==(j=S.value)||null==(N=j.data)?void 0:N.data)?y:null==(v=S.value)?void 0:v.data)?w:S.value)?F:[];eP((Array.isArray(e)?e:[]).filter(e=>["OPEN","ACCEPTED","IN_PROGRESS"].includes(e.status)).length)}e&&eU(!1)}}(),()=>{e=!1}},[]);let eJ=Number(null!=(U=null==eH?void 0:eH.earned_total)?U:0),e0=eJ>=5e4?"Gold":eJ>=1e4?"Silver":"Bronze",e1="Gold"===e0?null:"Silver"===e0?5e4:1e4,e5=e1?Math.min(Math.round(eJ/e1*100),100):100,e2=null!=(B=null!=(V=eC.find(e=>"ACTIVE"===e.status))?V:eC[0])?B:null,e4=(null==e2?void 0:e2.end_date)?Math.ceil((new Date(e2.end_date)-new Date)/864e5):null,e3=eI.filter(e=>"PAID"!==e.payment_status),e6=null!=(H=[...e3].sort((e,t)=>new Date(e.due_date)-new Date(t.due_date))[0])?H:null,e8=null!=(W=eA[0])?W:null,e7=Math.min(Math.round(null!=(Y=null==e8?void 0:e8.progress_percent)?Y:0),100),e9=null!=(q=null!=(z=null==e8?void 0:e8.saved_amount)?z:null==e8?void 0:e8.locked_amount)?q:0,te=null!=(K=null==e8?void 0:e8.target_amount)?K:0,tt=Math.max(0,te-e9),ts=null!=(Z=null==ey||null==(t=ey.full_name)?void 0:t.split(" ")[0])?Z:"there",ta=new Date().getHours(),tl=(0,a.jsxs)("div",{className:"".concat(M," p-4"),children:[(0,a.jsx)("p",{className:"text-base font-heading text-[#1F1F1F] mb-2 px-1",children:"Quick actions"}),(0,a.jsx)("div",{className:"grid grid-cols-3 gap-1",children:[{label:"Estate Access Code",icon:n.A,action:ev},{label:"Rent Report",icon:i.A,action:eg},{label:"Fund Wallet",icon:r.A,action:em}].map(e=>{let{label:t,icon:s,action:l}=e;return(0,a.jsxs)("button",{onClick:l,className:"flex flex-col items-center gap-1.5 py-3 rounded-2xl hover:bg-black/[0.03] transition-colors",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-[#EBF2FF] flex items-center justify-center",children:(0,a.jsx)(s,{className:"w-4 h-4 text-[#0052FF]"})}),(0,a.jsx)("span",{className:"text-[11px] font-medium text-gray-600 text-center leading-tight",children:t})]},t)})})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"min-h-screen bg-[#F0F4F9]",children:(0,a.jsxs)("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 pb-20",children:[(0,a.jsxs)("div",{className:"-mx-4 sm:-mx-6 mb-6 empty:hidden",children:[(0,a.jsx)(y.A,{onOpenKyc:eb}),(0,a.jsx)(w.A,{onVerify:eF})]}),(0,a.jsxs)("div",{className:"mb-7",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-[#444746] uppercase tracking-widest font-sans",children:ta<12?"Good morning":ta<17?"Good afternoon":"Good evening"}),(0,a.jsx)("h2",{className:"text-[32px] font-heading text-[#1F1F1F] mt-1 leading-[1.1]",children:ts})]}),!eO&&null!==e4&&e4>=0&&e4<=90&&(0,a.jsxs)("div",{className:"mb-4 rounded-[28px] px-4 py-3 flex items-start gap-3 ".concat(e4<=30?"bg-[#F9DEDC] text-[#8C1D18]":e4<=60?"bg-[#fdf2ee] text-[#4e2718]":"bg-[#CCE0FF] text-[#0039B5]"),children:[(0,a.jsx)(c.A,{className:"w-4 h-4 mt-0.5 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs font-bold",children:["Your rent expires in ",e4," day",1!==e4?"s":""]}),(0,a.jsx)("p",{className:"text-[11px] mt-0.5 opacity-80",children:"Contact your agent to discu
1ss renewal options before your rent expires."})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{className:"bg-[#1F1F1F] rounded-[28px] p-5 text-white",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[10px] font-medium text-white/40 uppercase tracking-widest font-sans",children:"Wallet balance"}),eO?(0,a.jsx)(O,{className:"h-8 w-32 bg-white/10 mt-1"}):(0,a.jsx)("p",{className:"text-[28px] font-heading tabular-nums text-white mt-1 leading-none",children:D(null!=(Q=null==ek?void 0:ek.balance)?Q:0)})]}),(0,a.jsxs)("button",{onClick:em,className:"text-[11px] font-medium text-white/50 hover:text-white transition-colors flex items-center gap-0.5 mt-1 font-sans",children:["Manage ",(0,a.jsx)(d.A,{className:"w-3 h-3"})]})]}),!eO&&(0,a.jsx)("div",{className:"pt-4 border-t border-white/10",children:(null==ek?void 0:ek.bank_name)?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-[9px] text-white/30 uppercase tracking-widest font-sans leading-none mb-0.5",children:ek.bank_name}),(0,a.jsx)("p",{className:"text-xs font-mono text-white/70 tracking-wider",children:null!=(X=ek.paystack_dva_number)?X:"â"})]}),ek.paystack_dva_number&&(0,a.jsx)("button",{onClick:function(){(null==ek?void 0:ek.paystack_dva_number)&&(navigator.clipboard.writeText(ek.paystack_dva_number),eL(!0),setTimeout(()=>eL(!1),1500))},className:"p-1.5 rounded-full bg-white/10 hover:bg-white/20 transition-colors shrink-0",children:eG?(0,a.jsx)(o.A,{className:"w-3 h-3 text-[#C4EED0]"}):(0,a.jsx)(x.A,{className:"w-3 h-3 text-white/40"})})]}):(0,a.jsx)("p",{className:"text-[10px] text-white/30 italic font-sans",children:"No DVA linked yet"})}),eH&&eH.balance>0&&(0,a.jsxs)("div",{className:"mt-3 flex items-center justify-between pt-3 border-t border-white/10",children:[(0,a.jsx)("p",{className:"text-[10px] text-white/40 font-sans",children:"Reward credits"}),(0,a.jsx)("button",{onClick:ef,className:"text-xs font-medium text-[#99C0FF] hover:text-white transition-colors font-sans",children:D(eH.balance)})]})]}),(0,a.jsx)("div",{className:"sm:hidden",children:tl}),(0,a.jsxs)("div",{className:"".concat(M," p-5"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,a.jsx)("p",{className:"text-base font-heading text-[#1F1F1F]",children:"Rent Savings"}),(0,a.jsxs)("button",{onClick:eu,className:"text-[11px] font-medium text-[#0052FF] hover:text-[#0039B5] flex items-center gap-0.5 transition-colors font-sans",children:["Manage ",(0,a.jsx)(d.A,{className:"w-3 h-3"})]})]}),eO?(0,a.jsxs)("div",{className:"space-y-3 mt-4",children:[(0,a.jsx)(O,{className:"h-8 w-32"}),(0,a.jsx)(O,{className:"h-2.5 w-full rounded-full"}),(0,a.jsx)(O,{className:"h-4 w-48"})]}):e8?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-between mt-4 mb-1 gap-2",children:[(0,a.jsx)("p",{className:"text-3xl tabular-nums tracking-tight text-[#1F1F1F] font-heading",children:D(e9)}),(0,a.jsxs)("p",{className:"text-xs text-gray-400 shrink-0",children:["of ",D(te)]})]}),(0,a.jsx)("div",{className:"h-1.5 bg-[#E8EAED] rounded-full overflow-hidden my-3",children:(0,a.jsx)("div",{className:"h-full bg-[#0052FF] rounded-full transition-all duration-700",style:{width:"".concat(e7,"%")}})}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-gray-500",children:[(0,a.jsx)(c.A,{className:"w-3.5 h-3.5 text-gray-400 shrink-0"}),(null==e2?void 0:e2.next_due_date)||(null==e8?void 0:e8.renewal_date)?(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(null==e2?void 0:e2.next_due_date)?"Due":"Goal",(0,a.jsx)("strong",{className:"text-gray-800",children:I(null!=($=null==e2?void 0:e2.next_due_date)?$:null==e8?void 0:e8.renewal_date)}),(0,a.jsx)(L,{days:function(e){if(!e)return null;let t=Math.ceil((new Date(e)-new Date)/864e5);return t>0?t:null}(null!=(J=null==e2?void 0:e2.next_due_date)?J:null==e8?void 0:e8.renew
1al_date),nextDueDate:null!=(ee=null==e2?void 0:e2.next_due_date)?ee:null==e8?void 0:e8.renewal_date})]}):(0,a.jsx)("span",{className:"text-gray-400",children:"No upcoming due date"})]}),(0,a.jsxs)("span",{className:"text-sm font-medium text-[#0052FF] font-sans",children:[e7,"%"]})]}),tt>0&&(0,a.jsxs)("p",{className:"mt-2 text-[11px] text-gray-400",children:[D(tt)," more to fully cover â top up via DVA any time"]}),e7>=100&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-1 text-[11px] font-medium text-[#0F5223] font-sans",children:[(0,a.jsx)(o.A,{className:"w-3.5 h-3.5"})," Fully funded"]})]}):(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)("p",{className:"text-sm text-gray-400 mb-3",children:"Set a savings goal and build up toward your next rent â no active rent needed to get started"}),(0,a.jsx)("button",{onClick:eu,className:"bg-[#0052FF] hover:bg-[#0039B5] text-white text-sm font-medium px-6 py-2.5 rounded-full transition-colors font-sans",children:"Start saving"})]})]}),(0,a.jsx)("div",{className:"hidden sm:block sm:col-span-2",children:tl}),(0,a.jsxs)("div",{className:"".concat(M," p-5 sm:col-span-2"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("p",{className:"text-base font-heading text-[#1F1F1F]",children:"Transactions"}),(0,a.jsxs)("button",{onClick:em,className:"text-[11px] font-medium text-[#0052FF] hover:text-[#0039B5] flex items-center gap-0.5 transition-colors font-sans",children:["All ",(0,a.jsx)(d.A,{className:"w-3 h-3"})]})]}),eO?(0,a.jsx)("div",{className:"space-y-3",children:[void 0,void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(O,{className:"w-8 h-8 rounded-full shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 space-y-1.5",children:[(0,a.jsx)(O,{className:"h-3.5 w-28"}),(0,a.jsx)(O,{className:"h-3 w-16"})]}),(0,a.jsx)(O,{className:"h-3.5 w-20 shrink-0"})]},t))}):0===eR.length?(0,a.jsx)("p",{className:"text-sm text-gray-400 py-3",children:"No transactions yet â fund your wallet to get started"}):(0,a.jsx)("div",{className:"divide-y divide-black/[0.04]",children:eR.slice(0,5).map(e=>{var t,s,l;let n="CREDIT"===e.type,i=null!=(l=null!=(s=T[null==(t=e.purpose)?void 0:t.toUpperCase()])?s:e.purpose)?l:"Transaction";return(0,a.jsxs)("button",{onClick:()=>eB(e),className:"w-full flex items-center gap-3 py-2.5 first:pt-0 last:pb-0 hover:bg-black/[0.02] active:bg-black/[0.04] -mx-2 px-2 rounded-xl transition-colors text-left",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full flex items-center justify-center shrink-0 ".concat(n?"bg-[#C4EED0]":"bg-[#F1F3F4]"),children:n?(0,a.jsx)(m.A,{className:"w-3.5 h-3.5 text-[#0F5223]"}):(0,a.jsx)(u.A,{className:"w-3.5 h-3.5 text-[#444746]"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-[#1F1F1F] truncate leading-none font-sans",children:i}),(0,a.jsx)("p",{className:"text-[11px] text-[#444746] mt-0.5 leading-none font-sans",children:e.timestamp?new Date(e.timestamp).toLocaleDateString("en-NG",{day:"numeric",month:"short"}):"â"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,a.jsxs)("p",{className:"text-sm tabular-nums font-sans ".concat(n?"text-[#0F5223]":"text-[#1F1F1F]"),children:[n?"+":"â",D(e.amount)]}),(0,a.jsx)(d.A,{className:"w-3 h-3 text-[#C4C7C5]"})]})]},e.id)})})]}),(0,a.jsxs)("div",{className:"".concat(M," p-5"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("p",{className:"text-base font-heading text-[#1F1F1F]",children:"My Rent"}),(0,a.jsxs)("button",{onClick:eh,className:"text-[11px] font-medium text-[#0052FF] hover:text-[#0039B5] flex items-center gap-0.5 transition-colors font-sans",children:["View ",(0,a.jsx)(d.A,{className:"w-3 h-3"})]})]}),eO?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(O,{className:"h-5 w-44"}),(0,a.jsx)(O,{className:"h-4 w-20"}),(0,a.jsx)(O,{className:"h-px w-full mt-3"}),(0,a.jsx)(O,{className:"h-10 w-full mt-2"})]}):e2?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-gray-900 truncate",children:null!=(ea=null!=(es=null!=(et=e2.property_name)?et:null==(F=e2.unit)||null==(s=F.property)?void 0:s.name)?es:null==(k=e2.property)?void 0:k.name)?ea:"Property"}),(0,a.jsxs)("p",{className:"text-xs text-gray-400 truncate mt-0.5",children:["Unit ",null!=(en=null!=(el=e2.unit_number)?el:null==(E=e2.unit)?void 0:E.unit_number)?en:"â"]}),(0,a.jsx)("div",{className:"my-3 h-px bg-black/[0.05]"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:P,children:"Rent"}),(0,a.jsx)("p",{className:"text-sm font-bold text-gray-900 tabular-nums mt-1",children:D(e2.rent_amount)})]}),e2.end_date&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:P,children:"Expires"}),(0,a.jsx)("p",{className:"text-sm font-semibold text-gray-900 mt-1",children:I(e2.end_date)})]})]}),(0,a.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,a.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-[10px] font-medium font-sans ".concat("ACTIVE"===e2.status?"bg-[#C4EED0] text-[#0F5223]":"bg-[#fdf2ee] text-[#4e2718]"),children:e2.status}),(0,a.jsxs)("button",{onClick:eN,className:"text-[11px] font-medium text-[#0052FF] hover:text-[#0039B5] flex items-center gap-0.5 transition-colors font-sans",children:["Receipt history ",(0,a.jsx)(d.A,{className:"w-3 h-3"})]})]}),(0,a.jsx)(G,{score:e2.risk_score,level:e2.risk_level})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-gray-400 mb-3",children:"No active rent"}),(0,a.jsxs)("button",{onClick:ej,className:"flex items-center gap-1.5 text-sm font-semibold text-[#0052FF] hover:text-[#0039B5] transition-colors",children:[(0,a.jsx)(h.A,{className:"w-3.5 h-3.5"})," Find a property"]})]})]}),(null==e2?void 0:e2.id)&&(0,a.jsx)(S,{leaseId:e2.id}),(0,a.jsxs)("div",{className:"".concat(M," p-5"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("p",{className:"text-base font-heading text-[#1F1F1F]",children:"Service Charges"}),!eO&&e3.length>0&&(0,a.jsxs)("span",{className:"text-[10px] font-bold bg-clay-50 text-clay-600 ring-1 ring-clay-200/60 shadow-[inset_0_1px_0_rgba(255,255,255,0.8)] px-2 py-0.5 rounded-full",children:[e3.length," due"]})]}),eO?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(O,{className:"h-4 w-32"}),(0,a.jsx)(O,{className:"h-8 w-24"}),(0,a.jsx)(O,{className:"h-4 w-20"}),(0,a.jsx)(O,{className:"h-8 w-full mt-2"})]}):e6?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-xs text-gray-500 truncate",children:null!=(ei=e6.name)?ei:"Service charge"}),(0,a.jsx)("p",{className:"text-2xl font-bold text-clay-600 tabular-nums mt-1",children:D(e6.amount)}),e6.due_date&&(0,a.jsxs)("p",{className:"text-[11px] text-gray-400 mt-1 flex items-center gap-1",children:[(0,a.jsx)(c.A,{className:"w-3 h-3"})," Due ",I(e6.due_date)]}),(0,a.jsx)("button",{onClick:em,className:"mt-4 w-full bg-[#0052FF] hover:bg-[#0039B5] text-white text-sm font-medium py-2.5 rounded-full transition-colors font-sans",children:"Pay now"})]}):(0,a.jsx)("p",{className:"text-sm text-gray-400",children:"No pending charges"})]}),(0,a.jsxs)("div",{className:"".concat(M," p-5"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("p",{className:"text-base font-heading text-[#1F1F1F]",children:"Maintenance"}),(0,a.jsxs)("button",{onClick:ep,className:"text-[11px] font-medium text-[#0052FF] hover:text-[#0039B5] flex items-center gap-0.5 transition-colors font-sans",children:["View ",(0,a.jsx)(d.A,{className:"w-3 h-3"})]})]}),eO?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(O,{className:"h-9 w-10"}),(0,a.jsx)(O,{className:"h-4 w-20"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-4xl font-bold tabular-nums ".concat(eM>0?"text-rose-500":"text-gray-900"),children:eM}),(0,a.jsxs)("p",{className:"text-xs text-gray-400 mt-1",children:["open ticket",1!==eM?"s":""]}),eM>0&&(0,a.jsx)("span",{className:"mt-2 inline-flex items-center text-[10px] font-bold text-red-600 border border-red-200 bg-red-50 px-2.5 py-1 rounded-full",children:"Needs attention"})]}),(0,a.jsx)("button",{onClick:ep,className:"mt-4 w-full bg-white ring-1 ring-black/[0.08] text-[#1F1F1F] text-sm font-medium py-2.5 rounded-full transition-colors hover:bg-[#F1F3F4] font-sans",children:"+ Raise a ticket"})]}),(0,a.jsxs)("div",{className:"".concat(M," p-5"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)(p.A,{className:"w-4 h-4 text-[#0052FF]"}),(0,a.jsx)("p",{className:"text-base font-heading text-[#1F1F1F]",children:"Refer a friend"})]}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Share your co
1de and earn rewards when friends join Resida."}),eY?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex-1 bg-[#F1F3F4] rounded-2xl px-3 py-2",children:[(0,a.jsx)("p",{className:"text-[10px] text-[#444746] font-medium uppercase tracking-widest leading-none mb-0.5 font-sans",children:"Your code"}),(0,a.jsx)("p",{className:"text-sm tracking-widest text-[#1F1F1F] font-mono",children:eY})]}),(0,a.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(eY),eK(!0),setTimeout(()=>eK(!1),1500)},className:"p-2.5 rounded-full bg-[#0052FF] text-white hover:bg-[#0039B5] transition-colors shrink-0",children:eq?(0,a.jsx)(o.A,{className:"w-4 h-4"}):(0,a.jsx)(x.A,{className:"w-4 h-4"})})]}):(0,a.jsxs)("button",{onClick:ef,className:"text-xs font-semibold text-[#0052FF] hover:text-[#0039B5] transition-colors flex items-center gap-1",children:["Get your referral code ",(0,a.jsx)(d.A,{className:"w-3 h-3"})]})]}),(0,a.jsxs)("div",{className:"sm:col-span-2 rounded-[28px] overflow-hidden bg-[#0052FF] p-5 text-white",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-2xl bg-white/15 flex items-center justify-center shrink-0",children:(0,a.jsx)(f.A,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-[10px] font-medium text-white/50 uppercase tracking-widest font-sans",children:"Rental Passport"}),(0,a.jsx)("p",{className:"text-base font-heading leading-snug mt-0.5",children:"Your verified tenant profile"})]})]}),eZ&&(0,a.jsxs)("div",{className:"shrink-0 text-right",children:[(0,a.jsx)("p",{className:"text-2xl font-heading tabular-nums leading-none",children:null!=(er=eZ.trust_score)?er:0}),(0,a.jsx)("p",{className:"text-[10px] text-white/50 font-sans mt-0.5",children:"Trust score"})]})]}),eZ&&(0,a.jsx)("div",{className:"mt-4 grid grid-cols-3 gap-2",children:[[null!=(ec=eZ.total_leases)?ec:0,"Rentals"],[null!=(ed=eZ.completed_leases)?ed:0,"Completed"],[null!=(eo=eZ.rent_certificates_issued)?eo:0,"Certificates"]].map(e=>{let[t,s]=e;return(0,a.jsxs)("div",{className:"bg-white/10 rounded-2xl px-3 py-2.5 text-center",children:[(0,a.jsx)("p",{className:"text-lg font-black tabular-nums",children:t}),(0,a.jsx)("p",{className:"text-[10px] text-white/50 font-sans uppercase tracking-wider mt-0.5",children:s})]},s)})}),eZ&&(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-1.5",children:[(null==(A=eZ.kyc_status)?void 0:A.toUpperCase())==="VERIFIED"?(0,a.jsxs)("span",{className:"flex items-center gap-1 text-[11px] font-semibold text-white/90 bg-white/15 px-2.5 py-1 rounded-full",children:[(0,a.jsx)(g.A,{className:"w-3 h-3"})," ID Verified"]}):(0,a.jsxs)("span",{className:"flex items-center gap-1 text-[11px] font-semibold text-white/60 bg-white/10 px-2.5 py-1 rounded-full",children:[(0,a.jsx)(g.A,{className:"w-3 h-3"})," ",(null==(_=eZ.kyc_status)?void 0:_.toUpperCase())==="PENDING"?"Pending Review":"Not Verified"]}),(0,a.jsxs)("span",{className:"text-[11px] font-semibold px-2.5 py-1 rounded-full ".concat("HIGH"===eZ.trust_level?"bg-emerald-400/20 text-emerald-200":"MEDIUM"===eZ.trust_level?"bg-amber-400/20 text-amber-200":"bg-white/10 text-white/60"),children:[null!=(ex=eZ.trust_level)?ex:"â"," Trust"]})]}),(0,a.jsxs)("div",{className:"mt-4 flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>window.location.href="/rental-passport",className:"flex-1 bg-white text-[#0052FF] text-sm font-semibold py-2.5 rounded-full hover:bg-white/90 transition-colors font-sans",children:"View my passport"}),(0,a.jsxs)("button",{onClick:()=>{let e="".concat(window.location.origin,"/rental-passport/").concat(null==ey?void 0:ey.id);navigator.clipboard.writeText(e),e$(!0),setTimeout(()=>e$(!1),1500)},className:"flex items-center gap-1.5 bg-white/15 hover:bg-white/25 text-white text-sm font-semibold px-4 py-2.5 rounded-full transition-colors font-sans shrink-0",children:[eX?(0,a.jsx)(o.A,{className:"w-4 h-4"}):(0,a.jsx)(N.A,{className:"w-4 h-4"}),eX?"Copied!":"Share"]})]})]}),!eO&&(null==e2?void 0:e2.risk_score)!=null&&(0,a.jsxs)("div",{className:"".concat(M," p-5 sm:col-span-2"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-violet-500 to-indigo-600 flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-white text-[8px] font-black",children:"AI"})}),(0,a.jsx)("p",{className:"text-base font-heading text-[#1F1F1F]",children:"AI Re
1nt Insights"})]}),(0,a.jsx)("span",{className:"text-[10px] font-bold px-2.5 py-0.5 rounded-full border ".concat("LOW"===e2.risk_level?"bg-[#EBF1FF] text-[#0039B5] border-[#CCE0FF]":"MEDIUM"===e2.risk_level?"bg-orange-50 text-orange-600 border-orange-200":"bg-red-50 text-red-600 border-red-200"),children:"LOW"===e2.risk_level?"Good Standing":"MEDIUM"===e2.risk_level?"Needs Attention":"At Risk"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"relative w-14 h-14 shrink-0",children:[(0,a.jsxs)("svg",{className:"w-14 h-14 -rotate-90",viewBox:"0 0 56 56",children:[(0,a.jsx)("circle",{cx:"28",cy:"28",r:"22",fill:"none",stroke:"#f3f4f6",strokeWidth:"5"}),(0,a.jsx)("circle",{cx:"28",cy:"28",r:"22",fill:"none",stroke:"LOW"===e2.risk_level?"#1d4ed8":"MEDIUM"===e2.risk_level?"#ea580c":"#dc2626",strokeWidth:"5",strokeDasharray:"".concat(2*Math.PI*22),strokeDashoffset:"".concat(2*Math.PI*22*(1-e2.risk_score/100)),strokeLinecap:"round"})]}),(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-sm font-black text-gray-900 tabular-nums",children:Math.round(e2.risk_score)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-xs font-semibold text-gray-700",children:["Rent score: ",(0,a.jsxs)("strong",{children:[Math.round(e2.risk_score),"/100"]})]}),(0,a.jsx)("p",{className:"text-[11px] text-gray-400 mt-0.5",children:"Higher is better. Updated daily."})]})]}),(null==(C=e2.risk_flags)?void 0:C.length)>0&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-400 mb-2",children:"Action items"}),e2.risk_flags.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-start gap-2 text-xs text-gray-600",children:[(0,a.jsx)("span",{className:"mt-0.5 w-3.5 h-3.5 rounded-full bg-orange-100 text-orange-600 flex items-center justify-center text-[8px] font-black shrink-0",children:"!"}),e]},t))]}),(!e2.risk_flags||0===e2.risk_flags.length)&&(0,a.jsxs)("p",{className:"text-xs text-[#0052FF] font-semibold flex items-center gap-1.5",children:[(0,a.jsx)(o.A,{className:"w-3.5 h-3.5"})," No issues found â your rent profile looks great!"]})]}),eH&&(0,a.jsxs)("div",{className:"".concat(M," p-5 sm:col-span-2"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("p",{className:"text-base font-heading text-[#1F1F1F]",children:"Loyalty"}),(0,a.jsx)("span",{className:"text-[10px] font-black uppercase tracking-widest px-2 py-0.5 rounded-full ".concat("Gold"===e0?"bg-yellow-50 text-yellow-700 ring-1 ring-yellow-200/60":"Silver"===e0?"bg-slate-100 text-slate-600 ring-1 ring-slate-200/60":"bg-orange-50 text-orange-700 ring-1 ring-orange-200/60"),children:e0})]}),(0,a.jsxs)("div",{className:"flex items-end justify-between mb-1.5",children:[(0,a.jsxs)("p",{className:"text-xs text-gray-500",children:["Total earned: ",(0,a.jsx)("strong",{className:"text-gray-800",children:D(eJ)})]}),e1&&(0,a.jsxs)("p",{className:"text-[10px] text-gray-400",children:[D(e1)," to ","Bronze"===e0?"Silver":"Gold"]})]}),(0,a.jsx)("div",{className:"h-2 bg-gray-100 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all duration-700 ".concat("Gold"===e0?"bg-gradient-to-r from-yellow-400 to-yellow-500":"Silver"===e0?"bg-gradient-to-r from-slate-400 to-slate-500":"bg-gradient-to-r from-orange-400 to-orange-500"),style:{width:"".concat(e5,"%")}})}),"Gold"===e0&&(0,a.jsx)("p",{className:"text-[11px] text-yellow-700 mt-2 font-semibold",children:"You are at the highest tier. Thank y
1ou for being a loyal Resida member!"})]})]})]})}),(0,a.jsx)(v.A,{tx:eV,onClose:()=>eB(null)})]})}},82915:(e,t,s)=>{s.d(t,{A:()=>m});var a=s(95155),l=s(12115),n=s(65229),i=s(17215),r=s(7013),c=s(5917),d=s(75426),o=s(5218);let x={RENT:"Rent",TOPUP:"Top-up",SERVICE:"Service",SHORTLET:"Shortlet",EVENT_HALL:"Event hall",PAYOUT:"Payout",REFUND:"Refund",INSPECTION:"Inspection",ESCROW_HOLD:"Escrow hold",ESCROW_RELEASE:"Escrow release",ESCROW_REFUND:"Escrow refund",LEGAL_FEE:"Legal fee",CAUTION_FEE:"Caution fee",CAUTION_FEE_REFUND:"Caution refund",SERVICE_CHARGE:"Service charge",SUBSCRIPTION:"Subscription",WITHDRAWAL_FEE:"Withdrawal fee",APPLICATION_FEE:"Application fee",BOOKING_FEE:"Booking fee",SAVINGS:"Rent prepayment",SAVINGS_FORFEIT:"Tenancy cancellation fee",REFERRAL_REWARD:"Referral reward",PROPERTY_OFFER_DEPOSIT:"Offer deposit",PROPERTY_SALE_PAYMENT:"Sale payment",PROPERTY_SALE_COMMISSION:"Sale commission",PROPERTY_SALE_REFUND:"Sale refund",VACATE_REFUND:"Vacate refund"};function m(e){var t,s,m,u;let h,{tx:p,onClose:f}=e;(0,o.K)(!!p);let[g,N]=(0,l.useState)(!1);if(!p)return null;let j="CREDIT"===p.type,b=null!=(u=null!=(m=x[null==(t=p.purpose)?void 0:t.toUpperCase()])?m:p.purpose)?u:"Transaction",v=null==(s=p.status)?void 0:s.toUpperCase(),y="SUCCESS"===v,w="FAILED"===v,F=p.timestamp?new Date(p.timestamp).toLocaleString("en-NG",{weekday:"short",day:"numeric",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}):"â";return(0,a.jsxs)("div",{className:"fixed inset-0 z-[110] flex items-end justify-center sm:items-center",onClick:f,children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/30"}),(0,a.jsxs)("div",{className:"relative w-full max-w-md bg-white rounded-t-[28px] sm:rounded-[28px] ring-1 ring-black/5 p-6 space-y-5",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("div",{className:"w-10 h-1 bg-[#C4C7C5] rounded-full sm:hidden mx-auto absolute top-3 left-1/2 -translate-x-1/2"}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-sm font-bold text-gray-900",children:"Transaction details"}),(0,a.jsx)("button",{onClick:f,className:"p-1.5 hover:bg-gray-100 rounded-full transition-colors",children:(0,a.jsx)(n.A,{className:"w-4 h-4 text-gray-500"})})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center py-2 gap-2",children:[(0,a.jsx)("div",{className:"w-14 h-14 rounded-full flex items-center justify-center ".concat(j?"bg-sage-50":"bg-red-50"),children:j?(0,a.jsx)(i.A,{className:"w-6 h-6 text-sage-600"}):(0,a.jsx)(r.A,{className:"w-6 h-6 text-red-500"})}),(0,a.jsxs)("p",{className:"text-3xl font-bold tabular-nums tracking-tight ".concat(j?"text-sage-600":"text-gray-900"),children:[j?"+":"-",(h=p.amount,new Intl.NumberFormat("en-NG",{style:"currency",currency:"NGN",minimumFractionDigits:2,maximumFractionDigits:2,trailingZeroDisplay:"stripIfInteger"}).format(null!=h?h:0))]}),(0,a.jsx)("p",{className:"text-sm font-semibold text-gray-700",children:b}),w&&(0,a.jsx)("span",{className:"text-xs font-bold text-red-600 bg-red-50 border border-red-100 px-3 py-1 rounded-full",children:"Failed"}),!y&&!w&&(0,a.jsx)("span",{className:"text-xs font-bold text-clay-600 bg-clay-50 border border-clay-100 px-3 py-1 rounded-full",children:"Pending"}),y&&(0,a.jsx)("span",{className:"text-xs font-bold text-sage-700 bg-sage-50 border border-sage-100 px-3 py-1 rounded-full",children:"Successful"})]}),(0,a.jsxs)("div",{className:"divide-y divide-gray-100 rounded-[28px] ring-1 ring-black/5 overflow-hidden",children:[[{label:"Date",value:F},{label:"Type",value:j?"Credit":"Debit"},p.description?{label:"Description",value:p.description}:null].filter(Boolean).map(e=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4 px-4 py-3",children:[(0,a.jsx)("p",{className:"text-xs text-gray-400 shrink-0 pt-px",children:e.label}),(0,a.jsx)("p",{className:"text-xs font-semibold text-gray-900 text-right",children:e.value})]},e.label)),p.reference&&(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[(0,a.jsx)("p",{className:"text-xs text-gray-400 shrink-0",children:"Reference"}),(0,a.jsxs)("button",{onClick:()=>{p.reference&&(navigator.clipboard.writeText(p.reference),N(!0),setTimeout(()=>N(!1),1500))},className:"flex items-center gap-1.5 text-xs font-semibold text-gray-900 hover:text-[#0052FF] transition-colors",children:[(0,a.jsx)("span",{className:"truncate max-w-[180px]",children:p.reference}),g?(0,a.jsx)(c.A,{className:"w-3 h-3 text-sage-500 shrink-0"}):(0,a.jsx)(d.A,{className:"w-3 h-3 text-gray-400 shrink-0"})]})]})]})]})]})}},89715:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(71847).A)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])}}]);
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.