(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,474915,e=>{"use strict";var a=e.i(843476),s=e.i(271645),t=e.i(872947),n=e.i(373375),r=e.i(463059);let l=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),i=({currentPage:e,totalPages:s,totalItems:t,itemsPerPage:i,onPageChange:c,loading:d=!1,showInfo:o=!0})=>{let m=(e-1)*i+1,x=Math.min(e*i,t);return s<=1?null:(0,a.jsx)("div",{className:"bg-white border-t border-gray-200 px-4 py-3 sm:px-6",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[o&&(0,a.jsx)("div",{className:"flex-1 flex justify-between sm:hidden",children:(0,a.jsxs)("p",{className:"text-sm text-secondary",children:[(0,a.jsx)("span",{className:"font-medium",children:m})," থেকে"," ",(0,a.jsx)("span",{className:"font-medium",children:x})," এর মধ্যে"," ",(0,a.jsx)("span",{className:"font-medium",children:t})," টি"]})}),(0,a.jsxs)("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[o&&(0,a.jsx)("div",{children:(0,a.jsxs)("p",{className:"text-sm text-secondary",children:[(0,a.jsx)("span",{className:"font-medium",children:m})," থেকে"," ",(0,a.jsx)("span",{className:"font-medium",children:x})," পর্যন্ত দেখানো হচ্ছে"," ",(0,a.jsx)("span",{className:"font-medium",children:t})," টি ফলাফলের মধ্যে"]})}),(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,a.jsxs)("button",{onClick:()=>c(e-1),disabled:1===e||d,className:`
                relative inline-flex items-center px-2 py-2 text-sm font-medium rounded-md
                ${1===e||d?"text-gray-400 cursor-not-allowed":"text-secondary hover:bg-primary/5 hover:text-primary cursor-pointer"}
                transition-colors duration-200
              `,children:[(0,a.jsx)(n.ChevronLeft,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"ml-1 hidden sm:inline",children:"আগের"})]}),(0,a.jsx)("div",{className:"flex items-center space-x-1",children:(()=>{let t=[];if(s<=5)for(let e=1;e<=s;e++)t.push(e);else{if(t.push(1),e<=3){for(let e=2;e<=Math.min(4,s-1);e++)t.push(e);s>4&&t.push("...")}else if(e>=s-2){s>4&&t.push("...");for(let e=Math.max(s-3,2);e<=s-1;e++)t.push(e)}else{t.push("...");for(let a=e-1;a<=e+1;a++)t.push(a);t.push("...")}s>1&&t.push(s)}return t.map((s,t)=>{if("..."===s)return(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)(l,{className:"h-4 w-4 text-gray-400"})},`ellipsis-${t}`);let n=s===e;return(0,a.jsx)("button",{onClick:()=>c(s),disabled:d||n,className:`
            px-3 py-2 text-sm font-medium rounded-md transition-colors duration-200
            ${n?"bg-primary text-white shadow-sm":"text-secondary hover:bg-primary/5 hover:text-primary"}
            ${d?"opacity-50 cursor-not-allowed":"cursor-pointer"}
            disabled:cursor-not-allowed disabled:opacity-50
          `,children:s},s)})})()}),(0,a.jsxs)("button",{onClick:()=>c(e+1),disabled:e===s||d,className:`
                relative inline-flex items-center px-2 py-2 text-sm font-medium rounded-md
                ${e===s||d?"text-gray-400 cursor-not-allowed":"text-secondary hover:bg-primary/5 hover:text-primary cursor-pointer"}
                transition-colors duration-200
              `,children:[(0,a.jsx)("span",{className:"mr-1 hidden sm:inline",children:"পরের"}),(0,a.jsx)(r.ChevronRight,{className:"h-4 w-4"})]})]})]}),(0,a.jsxs)("div",{className:"flex-1 flex justify-between sm:hidden",children:[(0,a.jsx)("button",{onClick:()=>c(e-1),disabled:1===e||d,className:`
              relative inline-flex items-center px-4 py-2 text-sm font-medium rounded-md
              ${1===e||d?"text-gray-400 cursor-not-allowed bg-gray-100":"text-secondary bg-white border border-gray-300 hover:bg-primary/5 hover:text-primary"}
            `,children:"আগের"}),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("span",{className:"text-sm text-secondary font-medium",children:["পৃষ্ঠা ",e," / ",s]})}),(0,a.jsx)("button",{onClick:()=>c(e+1),disabled:e===s||d,className:`
              relative inline-flex items-center px-4 py-2 text-sm font-medium rounded-md
              ${e===s||d?"text-gray-400 cursor-not-allowed bg-gray-100":"text-secondary bg-white border border-gray-300 hover:bg-primary/5 hover:text-primary"}
            `,children:"পরের"})]})]})})};var c=e.i(581949),d=e.i(197057),o=e.i(84204),m=e.i(693837),x=e.i(178583),p=e.i(503116),h=e.i(269638),f=e.i(688511),g=e.i(727612),u=e.i(87316),b=e.i(284614),j=e.i(343432),y=e.i(16715),N=e.i(107233),w=e.i(286536),v=e.i(303281),P=e.i(823962),C=e.i(555436),I=e.i(687130),k=e.i(37727);e.s(["default",0,()=>{let[e,n]=(0,s.useState)("drafts"),[r,l]=(0,s.useState)(""),[S,B]=(0,s.useState)("all"),[D,T]=(0,s.useState)([]),[O,$]=(0,s.useState)([]),[R,A]=(0,s.useState)({currentPage:1,totalPages:1,totalItems:0,itemsPerPage:10,hasNextPage:!1,hasPreviousPage:!1}),[_,F]=(0,s.useState)(""),[L,E]=(0,s.useState)(null),[M,z]=(0,s.useState)({total:0,pending:0,successful:0,successRate:0}),[U,Q]=(0,s.useState)(!0),[W,H]=(0,s.useState)(!1),[K,J]=(0,s.useState)(!1),[X,Z]=(0,s.useState)(null),[q,G]=(0,s.useState)(null),[V,Y]=(0,s.useState)(null),[ee,ea]=(0,s.useState)(null),[es,et]=(0,s.useState)(null),[en,er]=(0,s.useState)({isOpen:!1,draftId:"",applicationType:"new",applicantName:""}),[el,ei]=(0,s.useState)({isOpen:!1,draftId:null}),[ec,ed]=(0,s.useState)(!1),[eo,em]=(0,s.useState)({isOpen:!1,draft:null}),[ex,ep]=(0,s.useState)({isOpen:!1,application:null}),[eh,ef]=(0,s.useState)({currentPage:1,totalPages:1,totalItems:0,itemsPerPage:10}),[eg,eu]=(0,s.useState)({currentPage:1,totalPages:1,totalItems:0,itemsPerPage:10}),eb=async e=>{try{let a={page:e||eh.currentPage,limit:eh.itemsPerPage};_.trim()&&(a.search=_),S&&"all"!==S&&(a.type=S);let s=(await c.default.get("/api/reports/pending",{params:a,withCredentials:!0,headers:{"Content-Type":"application/json"},paramsSerializer:{indexes:null}})).data;if(s.success&&s.data){let e=s.data.map(e=>{var a,s;let t=(a=e.data?.formData||{},s=e.type,s?.includes("birth")?a["personInfoForBirth.personNameBn"]||a?.personInfoForBirth?.personNameBn||a?.personNameBn||a?.applicantName||a?.nameBn||"অজানা ব্যক্তি":s?.includes("death")?a?.searchResult?.nameBn||a?.personNameBn||a?.nameBn||"অজানা ব্যক্তি":a?.applicantName||a?.personNameBn||a?.nameBn||"অজানা ব্যক্তি");return{id:e.id,type:e.type,title:e.title,status:e.status,data:e.data,metadata:{applicantName:(e.type?.includes("death")?e.metadata?.deceasedName:e.metadata?.applicantName)||t||"অজানা ব্যক্তি",mobile:e.metadata?.mobile||e.data?.formData?.phone||e.data?.formData?.mobile||"N/A"},createdAt:e.created_at,updatedAt:e.updated_at}});T(e),s.pagination&&ef(e=>({...e,currentPage:s.pagination.currentPage,totalPages:s.pagination.totalPages,totalItems:s.pagination.totalItems}))}}catch(e){console.error("Error loading drafts:",e)}},ej=async e=>{J(!0);try{let a={page:e||eg.currentPage,limit:eg.itemsPerPage};_.trim()&&(a.search=_),S&&"all"!==S&&(a.type=S);let s=(await c.default.get("/api/reports/successful",{params:a,withCredentials:!0,headers:{"Content-Type":"application/json"},paramsSerializer:{indexes:null}})).data;if(s.success){let e=s.data;$(e),s.pagination&&(A(s.pagination),eu(e=>({...e,currentPage:s.pagination.currentPage,totalPages:s.pagination.totalPages,totalItems:s.pagination.totalItems})))}}catch(e){console.error("Error loading history:",e)}finally{J(!1)}},ey=async()=>{try{let e=(await c.default.get("/api/reports/stats",{withCredentials:!0,headers:{"Content-Type":"application/json"}})).data;e.success&&z(e.data)}catch(e){console.error("Error loading stats:",e)}},eN=async()=>{H(!0),"drafts"===e?await eb(eh.currentPage):await ej(eg.currentPage),H(!1)},ew=async e=>{ei({isOpen:!0,draftId:e})},ev=async()=>{if(el.draftId){ed(!0),ei({isOpen:!1,draftId:null});try{(await c.default.delete(`/api/reports/pending/${el.draftId}`,{withCredentials:!0,headers:{"Content-Type":"application/json"}})).data.success?(d.toast.success("Pending আবেদন মুছে ফেলা হয়েছে"),await eb(eh.currentPage)):d.toast.error("Pending আবেদন মুছে ফেলতে সমস্যা হয়েছে")}catch(e){console.error("Error deleting draft:",e),d.toast.error("Pending আবেদন মুছে ফেলতে সমস্যা হয়েছে")}finally{ed(!1)}}},eP=e=>{n(e),"drafts"===e?(ef(e=>({...e,currentPage:1})),eb(1)):(eu(e=>({...e,currentPage:1})),A(e=>({...e,currentPage:1})),ej(1))},eC=e=>new Date(e).toLocaleDateString("bn-BD",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"}),eI=e=>{switch(e){case"birth_registration":return"জন্ম নিবন্ধন";case"birth_correction":return"জন্ম সংশোধন";case"death_registration":return"মৃত্যু নিবন্ধন";default:return e}},ek=e=>{switch(e){case 1:return"তথ্য পূরণ";case 2:return"ডকুমেন্ট আপলোড";case 3:return"প্রিভিউ";case 4:return"মোবাইল যাচাই";default:return`ধাপ ${e}`}},eS=async e=>{ea(e.applicationId);try{let a="",s="";if("death_registration"===e.applicationType?(a=e.deathDate||"",s="মৃত্যু তারিখ"):(a=e.dateOfBirth||"",s="জন্ম তারিখ"),!a)return void d.toast.error(`${s} প্রয়োজন প্রিন্ট করার জন্য`);let t="";if(!a.includes("/"))return void d.toast.error(`${s} ফরম্যাট সঠিক নয়`);t=a.replace(/\//g,"%2F");let n="";if("birth_registration"===e.applicationType?n=`/api/certificates/registration?ref=${e.applicationId}&ts=${t}`:"birth_correction"===e.applicationType?n=`/api/certificates/correction?ref=${e.applicationId}&ts=${t}`:"death_registration"===e.applicationType&&(n=`/api/certificates/death-registration?appId=${e.applicationId}&date=${t}`),n){let e=(await c.default.get(n,{withCredentials:!0})).data;if("ok"===e.status&&e.payload&&e.signature){let a=`/api/documents/view?token=${encodeURIComponent(e.payload)}&session=${encodeURIComponent(e.signature)}`;window.open(a,"_blank")}else d.toast.error("প্রিন্ট URL পেতে ব্যর্থ হয়েছে")}}catch(e){d.toast.error("প্রিন্ট করতে সমস্যা হয়েছে")}finally{ea(null)}};return(0,s.useEffect)(()=>{(async()=>{Q(!0);try{await Promise.all([eb(),ey()]),"history"===e&&await ej()}catch(e){console.error("Error loading initial data:",e)}finally{Q(!1)}})()},[]),(0,s.useEffect)(()=>{"history"===e&&0===O.length&&ej()},[e]),(0,s.useEffect)(()=>{"drafts"===e?(ef(e=>({...e,currentPage:1})),eb(1)):"history"===e&&(eu(e=>({...e,currentPage:1})),A(e=>({...e,currentPage:1})),ej(1))},[_,S,e]),(0,a.jsxs)(t.default,{children:[(0,a.jsx)(d.ToastContainer,{position:"top-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"}),(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-gray-900 font-bangla text-2xl font-bold",children:"আবেদনের প্রতিবেদন"}),(0,a.jsx)("p",{className:"text-gray-600 font-bangla",children:"আপনার Pending ও Success Application দেখুন"})]}),(0,a.jsxs)("div",{className:"flex space-x-3",children:[(0,a.jsxs)("button",{onClick:eN,disabled:W,className:"border-gray-300 text-gray-700 hover:bg-gray-50 flex items-center space-x-2 rounded-lg border px-4 py-2 font-bangla transition-colors disabled:opacity-50",children:[(0,a.jsx)(y.RefreshCw,{className:`h-4 w-4 ${W?"animate-spin":""}`}),(0,a.jsx)("span",{children:"রিফ্রেশ"})]}),(0,a.jsxs)("a",{href:"/entrepreneur/applications/correction",className:"flex items-center space-x-2 rounded-lg bg-orange-600 px-4 py-2 font-bangla text-white transition-colors hover:bg-orange-700",children:[(0,a.jsx)(y.RefreshCw,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:"সংশোধন আবেদন"})]}),(0,a.jsxs)("a",{href:"/entrepreneur/applications/new",className:"flex items-center space-x-2 rounded-lg bg-primary px-4 py-2 font-bangla text-white transition-colors hover:bg-primary/90",children:[(0,a.jsx)(N.Plus,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:"নতুন আবেদন"})]})]})]}),(0,a.jsx)("div",{className:"border-gray-200 rounded-lg border bg-white p-4",children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4 md:flex-row md:space-x-4 md:space-y-0",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(C.Search,{className:"text-gray-400 absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"নাম, আইডি, মোবাইল, জন্ম নিবন্ধন নম্বর, জন্ম তারিখ অনুযায়ে খুঁজুন...",value:r,onChange:e=>{var a;l(a=e.target.value),L&&clearTimeout(L),E(setTimeout(()=>{F(a)},500))},className:"border-gray-200 w-full rounded-lg border py-2 pl-10 pr-4 font-bangla focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"})]})}),(0,a.jsx)("div",{className:"w-full md:w-48",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(I.Filter,{className:"text-gray-400 absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2"}),(0,a.jsxs)("select",{value:S,onChange:e=>{B(e.target.value)},className:"border-gray-200 w-full appearance-none rounded-lg border py-2 pl-10 pr-8 font-bangla focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary",children:[(0,a.jsx)("option",{value:"all",children:"সব ধরন"}),(0,a.jsx)("option",{value:"birth_registration",children:"জন্ম নিবন্ধন"}),(0,a.jsx)("option",{value:"birth_correction",children:"জন্ম সংশোধন"}),(0,a.jsx)("option",{value:"death_registration",children:"মৃত্যু নিবন্ধন"})]})]})}),(0,a.jsx)("div",{className:"flex space-x-2",children:(0,a.jsxs)("button",{onClick:()=>{l(""),F(""),B("all"),"drafts"===e?(ef(e=>({...e,currentPage:1})),eb(1)):(eu(e=>({...e,currentPage:1})),A(e=>({...e,currentPage:1})),ej(1))},className:"border-gray-200 text-gray-700 hover:bg-gray-50 flex items-center space-x-1 rounded-lg border px-3 py-2 font-bangla transition-colors",children:[(0,a.jsx)(k.X,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:"মুছুন"})]})})]})}),(0,a.jsxs)("div",{className:"border-gray-200 rounded-lg border bg-white",children:[(0,a.jsxs)("div",{className:"border-gray-200 flex border-b",children:[(0,a.jsxs)("button",{onClick:()=>eP("drafts"),className:`flex flex-1 items-center justify-center space-x-2 px-6 py-4 font-bangla transition-colors ${"drafts"===e?"bg-primary text-white":"text-gray-600 hover:bg-gray-50"}`,children:[(0,a.jsx)(x.FileText,{className:"h-5 w-5"}),(0,a.jsx)("span",{children:"Pending"}),D.length>0&&(0,a.jsx)("span",{className:"rounded-full bg-primary/20 px-2 py-1 text-xs text-primary",children:D.length})]}),(0,a.jsxs)("button",{onClick:()=>eP("history"),className:`flex flex-1 items-center justify-center space-x-2 px-6 py-4 font-bangla transition-colors ${"history"===e?"bg-primary text-white":"text-gray-600 hover:bg-gray-50"}`,children:[(0,a.jsx)(h.CheckCircle,{className:"h-5 w-5"}),(0,a.jsx)("span",{children:"Success Application"}),O.length>0&&(0,a.jsx)("span",{className:"rounded-full bg-primary/20 px-2 py-1 text-xs text-primary",children:O.length})]})]}),(0,a.jsx)("div",{className:"p-6",children:U?(0,a.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(y.RefreshCw,{className:"mx-auto mb-2 h-8 w-8 animate-spin text-primary"}),(0,a.jsx)("p",{className:"text-gray-600 font-bangla",children:"লোড করা হচ্ছে..."})]})}):"drafts"===e?D.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"space-y-2",children:D.map(e=>{let s=e.data?.formData||{},t=e.data?.searchResult||{},n=e.metadata.mobile||s.mobile||s.phone||"N/A",r="",l="";return"birth_registration"===e.type?r=s.dob||(s.day&&s.month&&s.year?`${s.day}/${s.month}/${s.year}`:e.data?.documentCheckDate||"N/A"):"birth_correction"===e.type?(l=s.brn||t.ubrn||"N/A",r=s.dob||s.personBirthDate||t.dob||"N/A"):"death_registration"===e.type&&(l=s.brn||s.applicantBrn||t.ubrn||"N/A",r=s.dob||s.applicantDob||t.dob||"N/A"),(0,a.jsx)("div",{className:"border-gray-200 rounded-lg border bg-white p-4 shadow-sm transition-shadow hover:shadow-md",children:(0,a.jsxs)("div",{className:"flex flex-col space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start space-x-3",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-yellow-100",children:(0,a.jsx)(p.Clock,{className:"h-5 w-5 text-yellow-600"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"text-gray-900 truncate font-bangla text-base font-semibold",children:e.metadata.applicantName||"অজানা ব্যক্তি"}),(0,a.jsx)("p",{className:"text-gray-600 truncate font-bangla text-sm",children:eI(e.type)}),(0,a.jsxs)("div",{className:"mt-2 space-y-1",children:[l&&"N/A"!==l&&(0,a.jsxs)("p",{className:"text-gray-700 flex items-center space-x-2 text-xs",children:[(0,a.jsx)("span",{className:"text-gray-500 font-bangla",children:"নিবন্ধন নং:"}),(0,a.jsx)("span",{className:"font-medium",children:l})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[n&&"N/A"!==n&&(0,a.jsxs)("p",{className:"text-gray-700 flex items-center space-x-2 text-xs",children:[(0,a.jsx)(j.Phone,{className:"text-gray-500 h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:n})]}),r&&"N/A"!==r&&(0,a.jsxs)("p",{className:"text-gray-700 flex items-center space-x-2 text-xs",children:[(0,a.jsx)(u.Calendar,{className:"text-gray-500 h-3 w-3"}),(0,a.jsx)("span",{className:"font-bangla font-medium",children:r})]})]})]})]})]}),(0,a.jsx)("span",{className:"ml-3 rounded-full bg-yellow-100 px-3 py-1 font-bangla text-xs font-medium text-yellow-700",children:"Pending"})]}),(0,a.jsxs)("div",{className:"border-gray-100 flex items-center justify-between border-t pt-3",children:[(0,a.jsxs)("div",{className:"text-gray-600 flex items-center space-x-4 text-xs",children:[(0,a.jsxs)("p",{className:"font-bangla",children:[(0,a.jsx)("span",{className:"text-gray-500",children:"ধাপ:"})," ",(0,a.jsx)("span",{className:"text-gray-900 font-medium",children:ek(e.data?.currentStep||1)})]}),(0,a.jsxs)("p",{className:"hidden font-bangla sm:block",children:[(0,a.jsx)("span",{className:"text-gray-500",children:"আপডেট:"})," ",(0,a.jsx)("span",{className:"text-gray-900 font-medium",children:eC(e.updatedAt)})]})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)("button",{onClick:()=>{G(e.id),setTimeout(()=>{em({isOpen:!0,draft:e}),G(null)},300)},disabled:q===e.id,className:"text-gray-700 hover:bg-gray-100 border-gray-300 flex items-center space-x-1 rounded-lg border bg-white px-3 py-1.5 font-bangla text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[q===e.id?(0,a.jsx)(y.RefreshCw,{className:"h-4 w-4 animate-spin"}):(0,a.jsx)(w.Eye,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"দেখুন"})]}),(0,a.jsxs)("button",{onClick:()=>(e=>{try{Z(e.id);let a="birth_correction"===e.type?"correction":"new";er({isOpen:!0,draftId:e.id,applicationType:a,applicantName:e.metadata.applicantName})}catch(e){console.error("Error generating QR code:",e),d.toast.error("QR কোড তৈরি করতে সমস্যা হয়েছে")}finally{Z(null)}})(e),disabled:X===e.id,className:"text-gray-700 hover:bg-gray-100 border-gray-300 flex items-center space-x-1 rounded-lg border bg-white px-3 py-1.5 font-bangla text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[X===e.id?(0,a.jsx)(y.RefreshCw,{className:"h-4 w-4 animate-spin text-primary"}):(0,a.jsx)(P.QrCode,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"QR"})]}),(0,a.jsxs)("button",{onClick:()=>{Y(e.id),"birth_correction"===e.type?window.location.href=`/entrepreneur/applications/correction?draftId=${e.id}`:"death_registration"===e.type?window.location.href=`/entrepreneur/applications/death?draftId=${e.id}`:window.location.href=`/entrepreneur/applications/new?draftId=${e.id}`},disabled:V===e.id,className:"text-gray-700 hover:bg-gray-100 border-gray-300 flex items-center space-x-1 rounded-lg border bg-white px-3 py-1.5 font-bangla text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[V===e.id?(0,a.jsx)(y.RefreshCw,{className:"h-4 w-4 animate-spin"}):(0,a.jsx)(f.Edit,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"সম্পাদনা"})]}),(0,a.jsxs)("button",{onClick:()=>ew(e.id),disabled:ec,className:"hover:bg-red-50 text-error border-red-300 flex items-center space-x-1 rounded-lg border bg-white px-3 py-1.5 font-bangla text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[ec?(0,a.jsx)(y.RefreshCw,{className:"h-4 w-4 animate-spin"}):(0,a.jsx)(g.Trash2,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"মুছুন"})]})]})]})]})},e.id)})}),(0,a.jsx)(i,{currentPage:eh.currentPage,totalPages:eh.totalPages,totalItems:eh.totalItems,itemsPerPage:eh.itemsPerPage,onPageChange:e=>{ef(a=>({...a,currentPage:e})),eb(e)},loading:U})]}):(0,a.jsxs)("div",{className:"py-12 text-center",children:[(0,a.jsx)(x.FileText,{className:"text-gray-400 mx-auto mb-4 h-12 w-12"}),(0,a.jsx)("h3",{className:"text-gray-900 mb-2 font-bangla text-lg font-medium",children:"কোনো Pending আবেদন নেই"}),(0,a.jsx)("p",{className:"text-gray-600 mb-4 font-bangla",children:"আপনার এখনো কোনো Pending আবেদন নেই। নতুন আবেদন শুরু করুন।"}),(0,a.jsxs)("div",{className:"flex justify-center space-x-4",children:[(0,a.jsxs)("a",{href:"/entrepreneur/applications/correction",className:"inline-flex items-center space-x-2 rounded-lg bg-orange-600 px-4 py-2 font-bangla text-white transition-colors hover:bg-orange-700",children:[(0,a.jsx)(y.RefreshCw,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:"সংশোধন আবেদন"})]}),(0,a.jsxs)("a",{href:"/entrepreneur/applications/new",className:"inline-flex items-center space-x-2 rounded-lg bg-primary px-4 py-2 font-bangla text-white transition-colors hover:bg-primary/90",children:[(0,a.jsx)(N.Plus,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:"নতুন আবেদন"})]})]})]}):K?(0,a.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(y.RefreshCw,{className:"mx-auto mb-2 h-8 w-8 animate-spin text-primary"}),(0,a.jsx)("p",{className:"text-gray-600 font-bangla",children:"সফল আবেদন লোড করা হচ্ছে..."})]})}):O.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"space-y-2",children:O.map(e=>(0,a.jsx)("div",{className:"border-gray-200 rounded-lg border bg-white p-4 shadow-sm transition-shadow hover:shadow-md",children:(0,a.jsxs)("div",{className:"flex flex-col space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start space-x-3",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-green-100",children:(0,a.jsx)(h.CheckCircle,{className:"h-5 w-5 text-green-600"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"text-gray-900 truncate font-bangla text-base font-semibold",children:e.applicantName||"N/A"}),(0,a.jsx)("p",{className:"text-gray-600 truncate font-bangla text-sm",children:e.applicationId}),(0,a.jsx)("p",{className:"text-gray-600 truncate font-bangla text-sm",children:eI(e.applicationType)}),(0,a.jsxs)("div",{className:"mt-2 space-y-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[e.mobileNumber&&(0,a.jsxs)("p",{className:"text-gray-700 flex items-center space-x-2 text-xs",children:[(0,a.jsx)(j.Phone,{className:"text-gray-500 h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:e.mobileNumber})]}),e.dateOfBirth&&(0,a.jsxs)("p",{className:"text-gray-700 flex items-center space-x-2 text-xs",children:[(0,a.jsx)(u.Calendar,{className:"text-gray-500 h-3 w-3"}),(0,a.jsx)("span",{className:"font-bangla font-medium",children:e.dateOfBirth})]})]}),e.permanentAddress&&(0,a.jsxs)("p",{className:"text-gray-700 flex items-start space-x-2 text-xs",children:[(0,a.jsx)(b.User,{className:"text-gray-500 h-3 w-3 mt-0.5 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-medium",children:e.permanentAddress})]})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-success px-3 py-1 font-bangla text-xs font-medium text-white",children:"Success"}),(e.fee??0)===0||e.is45DaysFree?(0,a.jsx)("span",{className:"rounded-full bg-green-50 px-3 py-1 font-bangla text-xs font-medium text-green-700 border border-green-200",children:"বিনামূল্যে"}):(0,a.jsxs)("span",{className:"rounded-full bg-amber-50 px-3 py-1 font-bangla text-xs font-medium text-amber-700 border border-amber-200",children:["পেইড • ৳",e.fee]})]})]}),(0,a.jsxs)("div",{className:"border-gray-100 flex items-center justify-between border-t pt-3",children:[(0,a.jsx)("div",{className:"text-gray-600 flex items-center space-x-4 text-xs",children:(0,a.jsxs)("p",{className:"font-bangla",children:[(0,a.jsx)("span",{className:"text-gray-500",children:"অনুমোদন:"})," ",(0,a.jsx)("span",{className:"text-gray-900 font-medium",children:new Date(e.approvalDate).toLocaleDateString("bn-BD")})]})}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)("button",{onClick:()=>{G(e.applicationId),setTimeout(()=>{ep({isOpen:!0,application:e}),G(null)},300)},disabled:q===e.applicationId,className:"text-gray-700 hover:bg-gray-100 border-gray-300 flex items-center space-x-1 rounded-lg border bg-white px-3 py-1.5 font-bangla text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[q===e.applicationId?(0,a.jsx)(y.RefreshCw,{className:"h-4 w-4 animate-spin"}):(0,a.jsx)(w.Eye,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"দেখুন"})]}),e.detailsId&&Number(e.detailsId)>0?(0,a.jsxs)("button",{onClick:()=>(e=>{if(e.detailsId&&Number(e.detailsId)>0){let a;et(e.applicationId);let s=e.detailsId.toString();if("birth_registration"===e.applicationType)a=`/entrepreneur/applications/new?draftId=${s}`;else if("birth_correction"===e.applicationType)a=`/entrepreneur/applications/correction?draftId=${s}`;else if("death_registration"===e.applicationType)a=`/entrepreneur/applications/death?draftId=${s}`;else{et(null),d.toast.error("Unknown application type for resubmission");return}window.location.href=a}else d.toast.error("No draft available for resubmission")})(e),disabled:es===e.applicationId,className:"text-gray-700 hover:bg-gray-100 border-gray-300 flex items-center space-x-1 rounded-lg border bg-white px-3 py-1.5 font-bangla text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[es===e.applicationId?(0,a.jsx)(y.RefreshCw,{className:"h-4 w-4 animate-spin text-warning"}):(0,a.jsx)(y.RefreshCw,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"পুনরায় জমা"})]}):null,(0,a.jsxs)("button",{onClick:()=>eS(e),disabled:ee===e.applicationId,className:"text-gray-700 hover:bg-gray-100 border-gray-300 flex items-center space-x-1 rounded-lg border bg-white px-3 py-1.5 font-bangla text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[ee===e.applicationId?(0,a.jsx)(y.RefreshCw,{className:"h-4 w-4 animate-spin text-primary"}):(0,a.jsx)(v.Printer,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"প্রিন্ট"})]})]})]})]})},e.id))}),(0,a.jsx)(i,{currentPage:eg.currentPage,totalPages:eg.totalPages,totalItems:eg.totalItems,itemsPerPage:eg.itemsPerPage,onPageChange:e=>{eu(a=>({...a,currentPage:e})),A(a=>({...a,currentPage:e})),ej(e)},loading:K})]}):(0,a.jsxs)("div",{className:"py-12 text-center",children:[(0,a.jsx)(h.CheckCircle,{className:"text-gray-400 mx-auto mb-4 h-12 w-12"}),(0,a.jsx)("h3",{className:"text-gray-900 mb-2 font-bangla text-lg font-medium",children:"কোনো Success Application নেই"}),(0,a.jsx)("p",{className:"text-gray-600 font-bangla",children:"আপনার এখনো কোনো Success Application নেই।"})]})})]})]}),en.isOpen&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:(0,a.jsxs)("div",{className:"mx-4 w-full max-w-md rounded-lg bg-white p-6",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-gray-900 font-bangla text-lg font-semibold",children:"QR কোড - আবেদন জমা দিন"}),(0,a.jsx)("button",{onClick:()=>er({isOpen:!1,draftId:"",applicantName:"",applicationType:"new"}),className:"text-gray-400 hover:text-gray-600",children:(0,a.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("p",{className:"text-gray-600 mb-2 font-bangla text-sm",children:["আবেদনকারী:"," ",(0,a.jsx)("span",{className:"font-medium",children:en.applicantName})]}),(0,a.jsxs)("p",{className:"text-gray-600 mb-4 font-bangla text-sm",children:["আবেদনের ধরন:"," ",(0,a.jsx)("span",{className:"font-medium",children:eI("correction"===en.applicationType?"birth_correction":"birth_registration")})]})]}),(0,a.jsx)("div",{className:"mb-4 flex justify-center",children:(0,a.jsx)(m.default,{draftId:en.draftId,applicationType:en.applicationType,className:"scale-110",showInstructions:!1})}),(0,a.jsxs)("div",{className:"text-gray-500 space-y-1 font-bangla text-sm",children:[(0,a.jsx)("p",{children:"এই QR কোডটি স্ক্যান করুন"}),(0,a.jsx)("p",{children:"মোবাইল অ্যাপে আবেদনটি সম্পূর্ণ করার জন্য"})]})]})]})}),(0,a.jsx)(o.default,{open:el.isOpen,onClose:()=>ei({isOpen:!1,draftId:null}),center:!0,showCloseIcon:!1,styles:{modal:{borderRadius:"12px",padding:"0",maxWidth:"400px",width:"100%"}},children:(0,a.jsxs)("div",{className:"rounded-lg bg-white p-6",children:[(0,a.jsx)("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-red/20",children:(0,a.jsx)(g.Trash2,{className:"h-6 w-6 text-red"})}),(0,a.jsx)("h3",{className:"mb-2 text-center font-bangla text-lg font-semibold text-black",children:"Pending আবেদন মুছে ফেলুন"}),(0,a.jsx)("p",{className:"mb-6 text-center font-bangla text-body",children:"আপনি কি এই Pending আবেদনটি মুছে ফেলতে চান? এটি স্থায়ীভাবে মুছে যাবে এবং আর পুনরুদ্ধার করা যাবে না।"}),(0,a.jsxs)("div",{className:"flex space-x-3",children:[(0,a.jsx)("button",{onClick:()=>ei({isOpen:!1,draftId:null}),className:"border-gray-300 text-gray-700 hover:bg-gray-50 flex-1 rounded-lg border px-4 py-2 font-bangla transition-colors",disabled:ec,children:"বাতিল"}),(0,a.jsx)("button",{onClick:ev,disabled:ec,className:"flex flex-1 items-center justify-center rounded-lg bg-red px-4 py-2 font-bangla text-white transition-colors hover:bg-red/90 disabled:cursor-not-allowed disabled:opacity-50",children:ec?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y.RefreshCw,{className:"mr-2 h-4 w-4 animate-spin"}),"মুছে ফেলা হচ্ছে..."]}):"হ্যাঁ, মুছে ফেলুন"})]})]})}),(0,a.jsx)(o.default,{open:eo.isOpen,onClose:()=>em({isOpen:!1,draft:null}),center:!0,showCloseIcon:!1,styles:{modal:{borderRadius:"12px",padding:"0",maxWidth:"600px",width:"100%",maxHeight:"80vh"}},children:eo.draft&&(0,a.jsxs)("div",{className:"rounded-lg bg-white",children:[(0,a.jsx)("div",{className:"border-gray-200 border-b px-6 py-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-yellow-100",children:(0,a.jsx)(w.Eye,{className:"h-5 w-5 text-yellow-600"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-bangla text-lg font-semibold text-black",children:"আবেদনের বিস্তারিত তথ্য"}),(0,a.jsx)("p",{className:"text-gray-600 font-bangla text-sm",children:"Pending Application"})]})]}),(0,a.jsx)("button",{onClick:()=>em({isOpen:!1,draft:null}),className:"text-gray-400 hover:text-gray-600",children:(0,a.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,a.jsx)("div",{className:"max-h-96 overflow-y-auto p-6",children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"rounded-lg bg-gray p-4",children:[(0,a.jsx)("h4",{className:"mb-3 font-bangla font-semibold text-black",children:"মৌলিক তথ্য"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"আবেদনের ধরন:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eI(eo.draft.type)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"আবেদনকারী:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eo.draft.metadata.applicantName})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"মোবাইল:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eo.draft.metadata.mobile})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"বর্তমান ধাপ:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ek(eo.draft.data?.currentStep||1)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"সর্বশেষ আপডেট:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eC(eo.draft.updatedAt)})]})]})]}),eo.draft.data?.formData&&(0,a.jsxs)("div",{className:"rounded-lg bg-gray p-4",children:[(0,a.jsx)("h4",{className:"mb-3 font-bangla font-semibold text-black",children:"আবেদন ফরমের তথ্য"}),(0,a.jsxs)("div",{className:"space-y-2",children:[eo.draft.data.formData.nameBn&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"নাম (বাংলা):"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eo.draft.data.formData.nameBn})]}),eo.draft.data.formData.personInfoForBirth?.personNameBn&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"ব্যক্তির নাম (বাংলা):"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eo.draft.data.formData.personInfoForBirth.personNameBn})]}),eo.draft.data.formData.dob&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"জন্ম তারিখ:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eo.draft.data.formData.dob})]}),eo.draft.data.formData.personInfoForBirth?.personBirthDate&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"ব্যক্তির জন্ম তারিখ:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eo.draft.data.formData.personInfoForBirth.personBirthDate})]}),eo.draft.data.formData.brn&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"জন্ম নিবন্ধন নম্বর:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eo.draft.data.formData.brn})]}),eo.draft.data.formData.phone&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"মোবাইল নম্বর:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eo.draft.data.formData.phone})]})]})]}),eo.draft.data?.changedFields&&eo.draft.data.changedFields.length>0&&(0,a.jsxs)("div",{className:"rounded-lg bg-warning/10 p-4",children:[(0,a.jsx)("h4",{className:"mb-3 font-bangla font-semibold text-black",children:"পরিবর্তিত ক্ষেত্রসমূহ"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:eo.draft.data.changedFields.map((e,s)=>(0,a.jsx)("span",{className:"rounded-full bg-warning/20 px-2 py-1 font-bangla text-xs",children:e},s))})]}),eo.draft.data?.uploadedFiles&&eo.draft.data.uploadedFiles.length>0&&(0,a.jsxs)("div",{className:"rounded-lg bg-gray p-4",children:[(0,a.jsx)("h4",{className:"mb-3 font-bangla font-semibold text-black",children:"আপলোডকৃত ডকুমেন্ট"}),(0,a.jsx)("div",{className:"space-y-2",children:eo.draft.data.uploadedFiles.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:e.name||e.documentType}),(0,a.jsx)("span",{className:"text-gray-500 font-bangla text-xs",children:new Date(e.timestamp).toLocaleDateString("bn-BD")})]},s))})]})]})})]})}),(0,a.jsx)(o.default,{open:ex.isOpen,onClose:()=>ep({isOpen:!1,application:null}),center:!0,showCloseIcon:!1,styles:{modal:{borderRadius:"12px",padding:"0",maxWidth:"600px",width:"100%",maxHeight:"80vh"}},children:ex.application&&(0,a.jsxs)("div",{className:"rounded-lg bg-white",children:[(0,a.jsx)("div",{className:"border-gray-200 border-b px-6 py-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-green-100",children:(0,a.jsx)(w.Eye,{className:"h-5 w-5 text-green-600"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-bangla text-lg font-semibold text-black",children:"আবেদনের বিস্তারিত তথ্য"}),(0,a.jsx)("p",{className:"text-gray-600 font-bangla text-sm",children:"Success Application"})]})]}),(0,a.jsx)("button",{onClick:()=>ep({isOpen:!1,application:null}),className:"text-gray-400 hover:text-gray-600",children:(0,a.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,a.jsx)("div",{className:"max-h-96 overflow-y-auto p-6",children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"rounded-lg bg-gray p-4",children:[(0,a.jsx)("h4",{className:"mb-3 font-bangla font-semibold text-black",children:"মৌলিক তথ্য"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"আবেদন নম্বর:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ex.application.applicationId})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"আবেদনের ধরন:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:eI(ex.application.applicationType)})]}),ex.application.applicantName&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"আবেদনকারী:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ex.application.applicantName})]}),ex.application.dateOfBirth&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"জন্ম তারিখ:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ex.application.dateOfBirth})]}),ex.application.mobileNumber&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"মোবাইল নম্বর:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ex.application.mobileNumber})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"অনুমোদনের তারিখ:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:new Date(ex.application.approvalDate).toLocaleDateString("bn-BD")})]})]})]}),(ex.application.permanentAddress||ex.application.village||ex.application.union||ex.application.upazila||ex.application.district)&&(0,a.jsxs)("div",{className:"rounded-lg bg-gray p-4",children:[(0,a.jsx)("h4",{className:"mb-3 font-bangla font-semibold text-black",children:"ঠিকানা"}),(0,a.jsxs)("div",{className:"space-y-2",children:[ex.application.permanentAddress&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"স্থায়ী ঠিকানা:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium text-right max-w-[60%]",children:ex.application.permanentAddress})]}),ex.application.village&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"গ্রাম:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ex.application.village})]}),ex.application.union&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"ইউনিয়ন:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ex.application.union})]}),ex.application.upazila&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"উপজেলা:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ex.application.upazila})]}),ex.application.district&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"জেলা:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ex.application.district})]})]})]}),(ex.application.fatherName||ex.application.motherName)&&(0,a.jsxs)("div",{className:"rounded-lg bg-gray p-4",children:[(0,a.jsx)("h4",{className:"mb-3 font-bangla font-semibold text-black",children:"পারিবারিক তথ্য"}),(0,a.jsxs)("div",{className:"space-y-2",children:[ex.application.fatherName&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"পিতার নাম:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ex.application.fatherName})]}),ex.application.motherName&&(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-gray-600 font-bangla text-sm",children:"মাতার নাম:"}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:ex.application.motherName})]})]})]}),ex.application.additionalInfo&&(0,a.jsxs)("div",{className:"rounded-lg bg-gray p-4",children:[(0,a.jsx)("h4",{className:"mb-3 font-bangla font-semibold text-black",children:"অতিরিক্ত তথ্য"}),(0,a.jsx)("div",{className:"space-y-2",children:Object.entries(ex.application.additionalInfo).map(([e,s])=>(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsxs)("span",{className:"text-gray-600 font-bangla text-sm capitalize",children:[e.replace(/([A-Z])/g," $1").trim(),":"]}),(0,a.jsx)("span",{className:"font-bangla text-sm font-medium",children:"string"==typeof s?s:JSON.stringify(s)})]},e))})]})]})})]})})]})}],474915)}]);