module.exports=[24361,(a,b,c)=>{b.exports=a.x("util",()=>require("util"))},14747,(a,b,c)=>{b.exports=a.x("path",()=>require("path"))},21861,a=>{"use strict";let b="en-LK",c="Asia/Colombo",d=/^\d{4}-\d{2}-\d{2}$/;function e(a,b){return a.find(a=>a.type===b)?.value??""}function f(a){return a instanceof Date?a:new Date("string"==typeof a&&d.test(a)?`${a}T00:00:00+05:30`:a)}function g(a){let b=f(a);if(Number.isNaN(b.getTime()))return"";let d=new Intl.DateTimeFormat("en-CA",{timeZone:c,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(b),g=e(d,"year"),h=e(d,"month"),i=e(d,"day");return`${g}-${h}-${i}`}a.s(["formatDate",0,function(a,d={}){if(null==a||""===a)return"";let e=f(a);return Number.isNaN(e.getTime())?"":new Intl.DateTimeFormat(b,{day:"2-digit",month:"short",year:"numeric",timeZone:c,...d}).format(e)},"formatDateTime",0,function(a,d={}){if(null==a||""===a)return"";let e=f(a);return Number.isNaN(e.getTime())?"":new Intl.DateTimeFormat(b,{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZone:c,...d}).format(e)},"formatNumber",0,function(a,c={}){let d="number"==typeof a?a:Number(a??0);return new Intl.NumberFormat(b,c).format(Number.isFinite(d)?d:0)},"getTodayDateInputValue",0,function(a=new Date){return g(a)},"isDateBefore",0,function(a,b){if(null==a||null==b)return!1;let c=g(a),d=g(b);return""!==c&&""!==d&&c<d}])},23431,a=>{"use strict";let b=(0,a.i(16244).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);a.s(["CheckCircle2",0,b],23431)},67274,a=>{"use strict";let b=(0,a.i(16244).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);a.s(["FileText",0,b],67274)},6890,a=>{"use strict";var b=a.i(73631),c=a.i(34769),d=a.i(45602),e=a.i(23431),f=a.i(67274),g=a.i(21861);a.s(["default",0,function(){let[a,h]=(0,c.useState)([]),[i,j]=(0,c.useState)(!0);(0,c.useEffect)(()=>{k()},[]);let k=async()=>{j(!0);try{let a=await d.default.get("/recoveries/completed");a.success&&h(a.data)}catch(a){console.error(a)}finally{j(!1)}};return(0,b.jsxs)("div",{className:"pb-8",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,b.jsx)("div",{className:"w-10 h-10 rounded-full bg-success-light text-success flex items-center justify-center",children:(0,b.jsx)(e.CheckCircle2,{size:20})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-xl font-bold",children:"Completed"}),(0,b.jsx)("p",{className:"text-sm text-[var(--text-muted)]",children:"Your recent successful collections"})]})]}),(0,b.jsx)("div",{className:"space-y-4",children:i?(0,b.jsx)("div",{className:"text-center py-12 text-[var(--text-muted)] animate-pulse",children:"Loading..."}):0===a.length?(0,b.jsx)("div",{className:"text-center py-12 text-[var(--text-muted)] bg-[var(--card)] rounded-xl border border-[var(--border-color)]",children:"No completed collections yet."}):(0,b.jsx)("div",{className:"card overflow-hidden p-0",children:(0,b.jsx)("div",{className:"divide-y divide-[var(--border-color)]",children:a.map(a=>(0,b.jsxs)("div",{className:"p-4 flex gap-4 items-center bg-[var(--background)]",children:[(0,b.jsx)("div",{className:"w-12 h-12 rounded-full bg-success-light text-success flex items-center justify-center shrink-0",children:(0,b.jsx)(f.FileText,{size:20})}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("p",{className:"font-bold text-[var(--foreground)] text-sm",children:a.customer_name}),(0,b.jsxs)("p",{className:"text-xs text-[var(--text-muted)] mt-0.5",children:["Loan #L-",a.loan_id?.toString().padStart(4,"0")]}),(0,b.jsx)("p",{className:"text-xs text-[var(--text-muted)] flex items-center gap-1 mt-1",children:(0,g.formatDateTime)(a.collection_date)})]}),(0,b.jsxs)("div",{className:"text-right",children:[(0,b.jsxs)("p",{className:"font-bold text-success",children:["Rs ",(0,g.formatNumber)(a.amount_collected)]}),(0,b.jsx)("p",{className:"text-xs text-[var(--text-muted)] uppercase mt-0.5",children:a.payment_method})]})]},a.id))})})})]})}])}];

//# sourceMappingURL=%5Broot-of-the-server%5D__092dmqw._.js.map