module.exports=[941675,a=>{"use strict";let b=(0,a.i(170106).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["Calendar",0,b],941675)},491665,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(973549),e=a.i(759726),f=a.i(856738),g=a.i(790166),h=a.i(724669),i=a.i(941675);a.s(["default",0,function(){let[a,j]=(0,c.useState)("balance"),[k,l]=(0,c.useState)(1),{data:m}=(0,e.useGetOfficeBalanceQuery)({type:a}),{data:n}=(0,e.useGetOfficeBalanceQuery)({type:"transactions",page:k}),o=m?.data||{totalEarned:0,totalPaidOut:0,currentBalance:0,lastPayoutAt:null},p=n?.data?.transactions||[],q=n?.data?.meta||{totalPages:1};return(0,b.jsx)(d.default,{children:(0,b.jsxs)("div",{className:"space-y-6 px-4 py-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-xl font-bold text-gray-900 font-bangla",children:"ব্যালেন্স"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-gray-500 font-bangla",children:"আপনার আয় ও লেনদেন"})]}),(0,b.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[(0,b.jsx)("div",{className:"rounded-xl border border-gray-200 bg-white p-5 shadow-sm",children:(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"rounded-full bg-primary/10 p-3",children:(0,b.jsx)(f.Wallet,{className:"h-6 w-6 text-primary"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-xs text-gray-500",children:"বর্তমান ব্যালেন্স"}),(0,b.jsxs)("p",{className:"text-xl font-bold text-gray-900",children:[o.currentBalance," টাকা"]})]})]})}),(0,b.jsx)("div",{className:"rounded-xl border border-gray-200 bg-white p-5 shadow-sm",children:(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"rounded-full bg-green-100 p-3",children:(0,b.jsx)(h.TrendingUp,{className:"h-6 w-6 text-green-600"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-xs text-gray-500",children:"মোট আয়"}),(0,b.jsxs)("p",{className:"text-xl font-bold text-gray-900",children:[o.totalEarned," টাকা"]})]})]})}),(0,b.jsx)("div",{className:"rounded-xl border border-gray-200 bg-white p-5 shadow-sm",children:(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"rounded-full bg-orange-100 p-3",children:(0,b.jsx)(g.DollarSign,{className:"h-6 w-6 text-orange-600"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-xs text-gray-500",children:"মোট পেআউট"}),(0,b.jsxs)("p",{className:"text-xl font-bold text-gray-900",children:[o.totalPaidOut," টাকা"]})]})]})})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-gray-200 bg-white shadow-sm",children:[(0,b.jsx)("div",{className:"border-b border-gray-200 p-4",children:(0,b.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"লেনদেনের ইতিহাস"})}),(0,b.jsx)("div",{className:"divide-y divide-gray-100",children:0===p.length?(0,b.jsx)("div",{className:"p-8 text-center text-gray-500",children:"কোনো লেনদেন নেই"}):p.map(a=>(0,b.jsx)("div",{className:"p-4",children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:`rounded-full p-2 ${a.amount>0?"bg-green-100":"bg-red-100"}`,children:(0,b.jsx)(h.TrendingUp,{className:`h-4 w-4 ${a.amount>0?"text-green-600":"text-red"}`})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"font-medium text-gray-900",children:a.description}),(0,b.jsxs)("p",{className:"text-xs text-gray-500",children:[(0,b.jsx)(i.Calendar,{className:"mr-1 inline h-3 w-3"}),new Date(a.created_at).toLocaleDateString("bn-BD")]})]})]}),(0,b.jsxs)("span",{className:`font-semibold ${a.amount>0?"text-green-600":"text-red"}`,children:[a.amount>0?"+":"",a.amount," টাকা"]})]})},a.id))}),q.totalPages>1&&(0,b.jsx)("div",{className:"border-t border-gray-200 p-4",children:(0,b.jsxs)("div",{className:"flex justify-center gap-2",children:[(0,b.jsx)("button",{onClick:()=>l(a=>Math.max(1,a-1)),disabled:1===k,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm disabled:opacity-50",children:"আগে"}),(0,b.jsxs)("span",{className:"flex items-center px-4 text-sm",children:["পৃষ্ঠা ",k," / ",q.totalPages]}),(0,b.jsx)("button",{onClick:()=>l(a=>Math.min(q.totalPages,a+1)),disabled:k===q.totalPages,className:"rounded-lg border border-gray-300 px-4 py-2 text-sm disabled:opacity-50",children:"পরে"})]})})]})]})})}])}];

//# sourceMappingURL=_129jzfx._.js.map