import{c as l,j as e}from"./index-D9pJRAs5.js";import{aG as c,X as o,m as n,ad as x}from"./ui-CtYVlq7P.js";import"./vendor-D6aTFYy9.js";import"./pdf-Bz_mU5mG.js";const p=({isOpen:r,onClose:s,chequeId:t})=>{const{cheques:i}=l(),a=i.find(d=>d.id===t);return!r||!a?null:e.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 z-[100] animate-fade-in",children:e.jsxs("div",{className:"bg-white dark:bg-gray-900 w-full max-w-lg rounded-[2.5rem] shadow-2xl flex flex-col max-h-[85vh] animate-scale-in border border-white/10",children:[e.jsxs("div",{className:"px-8 py-6 border-b dark:border-gray-800 flex justify-between items-center bg-gray-50 dark:bg-gray-800/50",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2.5 bg-indigo-600 text-white rounded-xl shadow-lg shadow-indigo-500/20",children:e.jsx(c,{size:20})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-black text-gray-900 dark:text-white uppercase tracking-tight",children:"Audit Trail"}),e.jsxs("p",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-widest",children:["Document Registry #",a.chequeNumber]})]})]}),e.jsx("button",{onClick:s,className:"p-2 text-gray-400 hover:text-gray-600 dark:hover:text-white transition-colors bg-white dark:bg-gray-800 rounded-full border dark:border-gray-700",children:e.jsx(o,{size:20})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-8 space-y-8 custom-scrollbar",children:[e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-2xl p-5 border dark:border-gray-700",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("h3",{className:"font-black text-gray-900 dark:text-white uppercase tracking-tight",children:a.partyName}),e.jsxs("span",{className:"font-mono text-xs font-bold text-indigo-600 dark:text-indigo-400",children:["RM ",a.amount.toFixed(2)]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(n,{size:12,className:"mr-1.5 opacity-50"}),"Issued: ",new Date(a.issueDate).toLocaleDateString()]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(x,{size:12,className:"mr-1.5 opacity-50"}),"Mature: ",new Date(a.dueDate).toLocaleDateString()]})]})]}),e.jsxs("div",{className:"relative pl-6 space-y-8",children:[e.jsx("div",{className:"absolute left-[11px] top-2 bottom-2 w-0.5 bg-gray-200 dark:bg-gray-700"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -left-[19px] top-1 w-4 h-4 rounded-full bg-blue-500 border-4 border-white dark:border-gray-900 shadow-sm z-10"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-[10px] font-black text-blue-500 uppercase tracking-widest",children:["Current Status: ",a.status]}),e.jsx("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-2xl border border-gray-100 dark:border-gray-700 shadow-sm",children:e.jsxs("p",{className:"text-sm text-gray-700 dark:text-gray-300 leading-relaxed italic",children:['"',a.notes||"No specific narrative recorded for this status transition.",'"']})})]})]}),e.jsxs("div",{className:"relative opacity-60",children:[e.jsx("div",{className:"absolute -left-[19px] top-1 w-4 h-4 rounded-full bg-gray-300 dark:bg-gray-600 border-4 border-white dark:border-gray-900 shadow-sm z-10"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-black text-gray-500 uppercase tracking-widest",children:"Registry Created"}),e.jsxs("p",{className:"text-xs text-gray-400 font-medium",children:["Initial entry into system on ",new Date(a.issueDate).toLocaleDateString()]})]})]})]})]}),e.jsx("div",{className:"p-8 border-t dark:border-gray-800 bg-gray-50 dark:bg-gray-800/30",children:e.jsx("button",{onClick:s,className:"w-full py-4 bg-gray-900 dark:bg-white text-white dark:text-gray-900 rounded-2xl font-black uppercase tracking-widest text-xs shadow-xl transition-all active:scale-95",children:"Close Registry"})})]})})};export{p as default};
