1import{r as a,ad as E,dh as A,j as t,a4 as d,A as F}from"./index-e5aa8977.js";import{S as P}from"./Search-6d403f4f.js";import{S as T}from"./SortFilter-c930db0a.js";import{T as I}from"./TransactionsTable-0549e0ad.js";import{A as O}from"./AdminPageHeader-6a767112.js";import{F as G}from"./index-6c4d6787.js";import{D as L}from"./index-f3d84f9d.js";/* empty css */import"./Pagination-9d1fc6b9.js";import"./index-6098fee3.js";import"./slicedToArray-9043efdc.js";import"./unsupportedIterableToArray-86e37eae.js";import"./objectWithoutProperties-36f9093e.js";import"./ResizeObserver.es-b51b3958.js";import"./asyncToGenerator-8c72b493.js";import"./setPrototypeOf-375db7f1.js";import"./TXDetailsModal-7c51dbe0.js";import"./TableSkeletonRows-30099c7c.js";import"./index-c26e703c.js";import"./TXDetails-36e0f78b.js";import"./withCopy-68ce9e20.js";import"./CopyIcon-783334b9.js";import"./DownloadIcon-9ee531a7.js";import"./transactionReceipt-6501afed.js";import"./fintava-a17b7528.js";import"./index-18857800.js";import"./TableEmptyState-00aa37c8.js";import"./Dropdown-894dc313.js";import"./DropdownIcon-5a374af2.js";import"./index-f8e85b7a.js";import"./index-efb8d1ba.js";import"./index-c6dc9876.js";import"./roundedArrow-acd4aef5.js";const R="_billing_g6js9_1",y="_panel_g6js9_5",B="_panel__table_g6js9_12",U="_panel__table_g6js9_12",w="_filters_g6js9_19",z="_filters__count_g6js9_25",M="_filters__count_g6js9_25",k="_filters__search_g6js9_39",H="_filters__search_g6js9_39",Q="_filters__control_g6js9_43",Z="_filters__control_g6js9_43",$="_filters__date_g6js9_46",q="_filters__date_g6js9_46",J="_filters__sort_g6js9_50",K="_filters__sort_g6js9_50",s={billing:R,panel:y,panel__table:B,panelTable:U,filters:w,filters__count:z,filtersCount:M,filters__search:k,filtersSearch:H,filters__control:Q,filtersControl:Z,filters__date:$,filtersDate:q,filters__sort:J,filtersSort:K},n=[{name:"All",value:""},{name:"Completed",value:"SUCCESS"},{name:"Pending",value:"PENDING"},{name:"Ongoing",value:"ONGOING"},{name:"Cancelled",value:"CANCELLED"},{name:"Failure",value:"FAILURE"}],V=()=>{var p;const[_,u]=a.useState(""),[c,i]=a.useState(1),[m,j]=a.useState(E),[h,S]=a.useState("DESC"),[l,x]=a.useState(),[o,C]=a.useState(),[v,b]=a.useState(""),{data:r,isFetching:N}=A({order:h,startDate:l,endDate:o,page:c,perPage:m,search:v,status:_}),D=e=>{var f,g;x((f=e[0])==null?void 0:f.toISOString()),C((g=e[1])==null?void 0:g.toISOString()),i(1)};return t.jsxs("div",{className:s.billing,children:[t.jsx(O,{title:"Billing",description:"Review and filter billing transactions across the platform."}),t.jsxs("section",{className:s.panel,children:[t.jsxs("div",{className:s.filters,children:[t.jsx("div",{className:s.filters__search,children:t.jsx(P,{placeholder:"Search billing transactions",onChange:e=>{b(e),i(1)}})}),t.jsx(G,{name:"Status",list:n,value:n.find(e=>e.value===_)||n[0],onChange:e=>{u(e.value),i(1)},className:s.filters__control}),t.jsx(L,{onChange:D,value:[l?d(l):void 0,o?d(o):void 0],wrapperClassName:s.filters__date,toggleClassName:s.filters__control}),t.jsx("div",{className:s.filters__sort,children:t.jsx(T,{onChange:e=>{S(e.toUpperCase()),i(1)},right:!0})}),t.jsxs("span",{className:s.filters__count,children:[((p=r==null?void 0:r.meta)==null?void 0:p.itemCount)||0," transactions found"]})]}),t.jsx("div",{className:s.panel__table,children:t.jsx(I,{transactions:(r==null?void 0:r.data)||[],loading:N,pagination:r==null?void 0:r.meta,setSize:j,setPage:i,size:m,page:c})})]})]})},Tt=()=>t.jsx(F,{children:t.jsx(V,{})});export{Tt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.