"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[523],{523:(e,a,l)=>{l.r(a),l.d(a,{default:()=>n});var s=l(5155),t=l(2115),r=l(7489),c=l(3578);let n=e=>{let{isTamil:a,title:l,tamilTitle:n,accountNumber:o,bankName:i,tamilBankName:d,branch:u,tamilBranch:m,ifscCode:b,accountType:x,tamilAccountType:h,className:g=""}=e,[N,v]=(0,t.useState)(""),[j,p]=(0,t.useState)([]),[f,y]=(0,t.useState)([]),[C,w]=(0,t.useState)(!0);if((0,t.useEffect)(()=>{(async()=>{try{let e=new Date;e.setFullYear(e.getFullYear()-9.5);let a=[{id:"1",customerId:"CUST001",customerName:"John Doe",tamilCustomerName:"ஜான் டோ",accountNumber:"1234567890",lastTransactionDate:"2015-01-15",balance:15e3,branch:"Main Branch",tamilBranch:"முதன்மை கிளை"}].filter(a=>new Date(a.lastTransactionDate)<e);p(a),y(a)}catch(e){console.error("Error fetching inoperative accounts:",e)}finally{w(!1)}})()},[]),(0,t.useEffect)(()=>{if(!N.trim())return void y(j);let e=N.toLowerCase();y(j.filter(a=>a.customerId.toLowerCase().includes(e)||a.customerName.toLowerCase().includes(e)||a.accountNumber.includes(e)))},[N,j]),C)return(0,s.jsx)("div",{className:"bg-white rounded-xl shadow-lg p-6 sm:p-8 ".concat(g),children:(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500"})})});let D=e=>{let{label:a,value:l,isMono:t=!1}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-gray-500",children:a}),(0,s.jsx)("p",{className:"text-base font-medium text-gray-800 ".concat(t?"font-mono":""),children:l})]})};return(0,s.jsxs)("div",{className:"bg-white rounded-xl shadow-lg p-6 sm:p-8 ".concat(g),children:[(0,s.jsx)("div",{className:"mb-8",children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(r.g,{icon:c.MjD,className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-400"}),(0,s.jsx)("input",{type:"text",placeholder:a?"வாடிக்கையாளர் ஐடி, பெயர் அல்லது கணக்கு எண் மூலம் தேடவும்":"Search by Customer ID, Name, or Account Number",value:N,onChange:e=>v(e.target.value),className:"w-full p-3 pl-12 border border-gray-300 rounded-full focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-shadow shadow-sm"})]})}),(0,s.jsx)("div",{className:"space-y-6",children:f.length>0?f.map(e=>(0,s.jsx)("div",{className:"border border-gray-200 rounded-lg p-4 sm:p-6 bg-gray-50/50",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6",children:[(0,s.jsx)(D,{label:a?"வாடிக்கையாளர் பெயர்":"Customer Name",value:a?e.tamilCustomerName:e.customerName}),(0,s.jsx)(D,{label:a?"வாடிக்கையாளர் ஐடி":"Customer ID",value:e.customerId,isMono:!0}),(0,s.jsx)(D,{label:a?"கணக்கு எண்":"Account Number",value:e.accountNumber,isMono:!0}),(0,s.jsx)(D,{label:a?"கிளை":"Branch",value:a?e.tamilBranch:e.branch}),(0,s.jsx)(D,{label:a?"கடைசி பரிவர்த்தனை":"Last Transaction",value:e.lastTransactionDate}),(0,s.jsx)(D,{label:a?"இருப்பு":"Balance",value:"₹".concat(e.balance.toLocaleString())})]})},e.id)):(0,s.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg",children:[(0,s.jsx)(r.g,{icon:c.iW_,className:"text-3xl text-gray-400 mb-4"}),(0,s.jsx)("p",{className:"text-lg font-medium text-gray-700",children:a?"முடிவுகள் எதுவும் இல்லை":"No Matching Accounts Found"}),(0,s.jsx)("p",{className:"text-gray-500 mt-1",children:a?"உங்கள் தேடல் அளவுகோல்களை சரிபார்த்து மீண்டும் முயற்சிக்கவும்.":"Check your search criteria and try again."})]})}),o&&(0,s.jsxs)("div",{className:"mt-12 pt-8 border-t border-gray-200",children:[(0,s.jsx)("h3",{className:"text-xl font-semibold text-gray-800 mb-4",children:a?"வங்கி கணக்கு விவரங்கள்":"Bank Account Details"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 p-6 bg-blue-50 rounded-lg",children:[{label:a?"கணக்கு எண்":"Account Number",value:o,isMono:!0},{label:"IFSC Code",value:b,isMono:!0},{label:a?"வங்கி பெயர்":"Bank Name",value:a?d:i},{label:a?"கிளை":"Branch",value:a?m:u},{label:a?"கணக்கு வகை":"Account Type",value:a?h:x}].map(e=>e.value&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-gray-600",children:e.label}),(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"text-base font-semibold text-gray-900 ".concat(e.isMono?"font-mono":""),children:e.value}),("Account Number"===e.label||"கணக்கு எண்"===e.label||"IFSC Code"===e.label)&&(0,s.jsx)("button",{onClick:()=>navigator.clipboard.writeText(e.value),className:"ml-3 text-blue-600 hover:text-blue-800 transition-colors","aria-label":"".concat(a?"நகலெடு":"Copy"," ").concat(e.label),children:(0,s.jsx)(r.g,{icon:c.jPR})})]})]},e.label))})]})]})}}}]);