module.exports=[596221,a=>{"use strict";let b=(0,a.i(170106).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);a.s(["Loader2",0,b],596221)},862722,a=>{"use strict";let b=(0,a.i(170106).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);a.s(["XCircle",0,b],862722)},680678,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(973549),e=a.i(759726),f=a.i(28915),g=a.i(790166),h=a.i(596221),i=a.i(641710),j=a.i(816201),k=a.i(862722),l=a.i(292e3);a.s(["default",0,function(){let{data:a}=(0,e.useGetSonodTypesQuery)(),{data:m,refetch:n}=(0,e.useGetOfficeFeeRequestsQuery)(),[o,{isLoading:p}]=(0,e.useCreateOfficeFeeRequestMutation)(),[q,r]=(0,c.useState)(""),[s,t]=(0,c.useState)(""),u=a?.data?.sonodTypes||[],v=m?.data?.requests||[],w=async()=>{if(!q||!s)return void f.toast.error("অনুগ্রহ করে সব তথ্য পূরণ করুন");try{let a=await o({sonodTypeId:parseInt(q),officeFee:parseInt(s)});a.data?.success&&(f.toast.success("ফি অনুরোধ জমা দেওয়া হয়েছে"),r(""),t(""),n())}catch(a){f.toast.error("ব্যর্থ")}};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:"rounded-xl border border-gray-200 bg-white p-5 shadow-sm",children:[(0,b.jsx)("h3",{className:"mb-4 text-base font-semibold text-gray-900",children:"নতুন ফি অনুরোধ"}),(0,b.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"mb-1 block text-sm font-medium text-gray-700",children:"সনদের ধরন"}),(0,b.jsxs)("select",{value:q,onChange:a=>r(a.target.value),className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm",children:[(0,b.jsx)("option",{value:"",children:"নির্বাচন করুন"}),u.map(a=>(0,b.jsxs)("option",{value:a.id,children:[a.nameBn," (বর্তমান: ",a.defaultOfficeFee," টাকা)"]},a.id))]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"mb-1 block text-sm font-medium text-gray-700",children:"অফিস ফি (টাকা)"}),(0,b.jsx)("input",{type:"number",min:"0",value:s,onChange:a=>t(a.target.value),placeholder:"ফি প্রদান করুন...",className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm"})]})]}),(0,b.jsxs)("button",{onClick:w,disabled:p||!q||!s,className:"mt-4 flex items-center gap-2 rounded-lg bg-primary px-6 py-2 text-sm font-medium text-white disabled:opacity-50",children:[p?(0,b.jsx)(h.Loader2,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(g.DollarSign,{className:"h-4 w-4"}),"অনুরোধ জমা দিন"]})]}),(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===v.length?(0,b.jsxs)("div",{className:"p-8 text-center",children:[(0,b.jsx)(l.AlertCircle,{className:"mx-auto mb-2 h-12 w-12 text-gray-300"}),(0,b.jsx)("p",{className:"text-sm text-gray-500",children:"কোনো অনুরোধ নেই"})]}):v.map(a=>{let c={pending:{icon:(0,b.jsx)(i.Clock,{className:"h-4 w-4"}),color:"text-yellow-600",bgColor:"bg-yellow-100",label:"পেন্ডিং"},approved:{icon:(0,b.jsx)(j.CheckCircle,{className:"h-4 w-4"}),color:"text-green-600",bgColor:"bg-green-100",label:"অনুমোদিত"},rejected:{icon:(0,b.jsx)(k.XCircle,{className:"h-4 w-4"}),color:"text-red",bgColor:"bg-red/10",label:"বাতিল"}},d=c[a.approvalStatus]||c.pending;return(0,b.jsx)("div",{className:"p-4",children:(0,b.jsxs)("div",{className:"flex items-start justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h4",{className:"font-medium text-gray-900",children:a.sonodType?.nameBn}),(0,b.jsxs)("p",{className:"text-sm text-gray-500",children:["অফিস ফি: ",a.officeFee," টাকা"]}),a.rejectedReason&&(0,b.jsxs)("p",{className:"mt-1 text-xs text-red",children:["কারণ: ",a.rejectedReason]})]}),(0,b.jsxs)("div",{className:`flex items-center gap-1 rounded-full px-3 py-1 text-xs font-medium ${d.bgColor} ${d.color}`,children:[d.icon,d.label]})]})},a.id)})})]})]})})}])}];

//# sourceMappingURL=_0ts~mzh._.js.map