"use strict";exports.id=62289,exports.ids=[62289],exports.modules={4483:(a,b,c)=>{c.d(b,{l:()=>i});var d=c(48249),e=c(82697);let f={PAID:"text-emerald-700",PARTIAL:"text-amber-700",UNPAID:"text-rose-700"},g={CASH:"Cash",BANK:"Bank transfer",ESEWA:"eSewa",CARD:"Card",OTHER:"Other"};function h(a){return Number(a||0).toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})}function i({data:a,studentLabel:b}){let c=b||[a.student.fullName,a.student.studentCode,a.schoolClass.displayName,a.academicYear.name].filter(Boolean).join(" \xb7 ");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(e.jQ,{items:[{label:"Assigned",value:h(a.totals.totalAssigned)},{label:"Paid",value:h(a.totals.totalPaid)},{label:"Due",value:h(a.totals.totalDue)}]}),(0,d.jsxs)("div",{className:"overflow-hidden rounded-lg border border-slate-100 bg-white shadow-sm",children:[(0,d.jsx)("div",{className:"border-b border-slate-100 bg-slate-50/80 px-4 py-3 text-sm text-slate-600 sm:px-5",children:c}),a.lines.length?(0,d.jsx)("ul",{className:"divide-y divide-slate-100",children:a.lines.map(a=>(0,d.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-3 px-4 py-3 text-sm sm:px-5",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-slate-900",children:a.feesMaster.feesType?.name||"Fee"}),(0,d.jsxs)("p",{className:"text-xs text-slate-500",children:["Assigned ",h(a.assignedAmount)," \xb7 Paid ",h(a.paidAmount)]})]}),(0,d.jsxs)("div",{className:"text-right",children:[(0,d.jsx)("p",{className:"font-semibold tabular-nums text-slate-900",children:h(a.dueAmount)}),(0,d.jsx)("p",{className:`text-xs font-medium ${f[a.status]||"text-slate-500"}`,children:a.status})]})]},a.feesMaster.id))}):(0,d.jsx)("div",{className:"p-6",children:(0,d.jsx)(e.i0,{title:"No fee lines",description:"Fee types for this class have not been set up yet."})})]}),a.payments?.length?(0,d.jsxs)("section",{className:"overflow-hidden rounded-lg border border-slate-100 bg-white shadow-sm",children:[(0,d.jsxs)("div",{className:"border-b border-slate-100 px-4 py-3 sm:px-5",children:[(0,d.jsx)("h2",{className:"text-sm font-semibold text-slate-900",children:"Payment history"}),(0,d.jsx)("p",{className:"mt-0.5 text-xs text-slate-500",children:"Receipts recorded by the school office"})]}),(0,d.jsx)("ul",{className:"divide-y divide-slate-100",children:a.payments.map(a=>(0,d.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-3 px-4 py-3 text-sm sm:px-5",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-slate-900",children:a.receiptNo||"Receipt"}),(0,d.jsxs)("p",{className:"text-xs text-slate-500",children:[a.paymentDate||"—",a.notes?` \xb7 ${a.notes}`:""]})]}),(0,d.jsxs)("div",{className:"text-right",children:[(0,d.jsx)("p",{className:"font-semibold tabular-nums text-slate-900",children:h(a.totalAmount)}),(0,d.jsx)("p",{className:"text-xs text-slate-500",children:g[a.method]||a.method})]})]},a.id))})]}):null]})}},62289:(a,b,c)=>{c.r(b),c.d(b,{default:()=>i});var d=c(48249),e=c(67484),f=c(42947),g=c(82697),h=c(4483);function i(){let[a,b]=(0,e.useState)(null),[c,i]=(0,e.useState)(!0);return(0,d.jsx)(f.o,{title:"Fees",description:"Your assigned fees, payments, and remaining dues.",children:c?(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-slate-100"}):a?(0,d.jsx)(h.l,{data:a}):(0,d.jsx)(g.i0,{title:"No fee records",description:"Your school has not assigned fees to your class yet."})})}c(92038),c(91115)}};