import{r as p,bV as u,j as e,bY as g,bZ as j,b_ as h,b$ as R}from"./vendor-BKmmeuxg.js";import{T}from"./table-filter-D1fnjeZE.js";import{T as y}from"./table-footer-B-sB7gNG.js";import{T as M}from"./table-header-DVkEnG6Y.js";import{C as w}from"./card-D9_SJYq6.js";import{T as C,a as S,b as n,c as d}from"./table-DWOXv4Pu.js";import{D as N}from"./layout-DkwBWm5d.js";import F from"./offline-table-columns-CAMylKLg.js";import O from"./verify-payment-modal-B6jV-97s.js";import"./use-lang-YfV87_zl.js";import"./debounce-CWHP_ANh.js";import"./route-B4ZMN77y.js";import"./utils-DxSsnXxD.js";import"./button-BpNwv2aE.js";import"./index-WW_1X1qx.js";import"./dropdown-menu-DO-po5c1.js";import"./scroll-area-C8HGru-R.js";import"./table-page-size-OCfjNXER.js";import"./sidebar-BYcYxQeZ.js";import"./separator-_3LZ_wAA.js";import"./sheet-DSvHVmaW.js";import"./tooltip-BsX7Z6vz.js";import"./main-_V386djS.js";import"./index-D9-QKOod.js";import"./appearance-D2z3xcjR.js";import"./app-BytVvUs_.js";/* empty css            */import"./language-BFZ7KItL.js";import"./notification-CYMPYbAP.js";import"./popover-B4kBsMuI.js";import"./app-logo-CmnEIwal.js";import"./accordion-CNBvFN43.js";import"./avatar-j28afJTV.js";import"./badge-AQfLLMpR.js";import"./alert-D9uBQ7fu.js";import"./dialog-B2gN9MvT.js";import"./label-HmIcv5Yx.js";import"./textarea-CyndvowL.js";import"./richtor-CRcM6Du2.js";const P=({payments:t,translate:c})=>{var m;const{dashboard:f}=c,[s,l]=p.useState(null),[b,i]=p.useState(!1),x=o=>{l(o),i(!0)},r=u({data:t.data,columns:F(x),getCoreRowModel:R(),getSortedRowModel:h(),getFilteredRowModel:j()});return e.jsxs(e.Fragment,{children:[e.jsxs(w,{children:[e.jsx(T,{data:t,title:"Offline Payment Report",globalSearch:!0,tablePageSizes:[10,15,20,25,50],routeName:"payment-reports.offline.index",className:"w-full"}),e.jsxs(C,{className:"border-border border-y",children:[e.jsx(M,{table:r}),e.jsx(S,{children:(m=r.getRowModel().rows)!=null&&m.length?r.getRowModel().rows.map(o=>e.jsx(n,{"data-state":o.getIsSelected()&&"selected",children:o.getVisibleCells().map(a=>e.jsx(d,{children:g(a.column.columnDef.cell,a.getContext())},a.id))},o.id)):e.jsx(n,{children:e.jsx(d,{colSpan:8,className:"h-24 text-center",children:f.no_results})})})]}),e.jsx(y,{className:"mt-1 p-5 sm:p-7",routeName:"payment-reports.offline.index",paginationInfo:t})]}),s&&e.jsx(O,{payment:s,isOpen:b,onClose:()=>{i(!1),l(null)}})]})};P.layout=t=>e.jsx(N,{children:t});export{P as default};
