import{d0 as w,j as e,dj as x,dE as y,dw as v,cO as T,d3 as R,d4 as C,d5 as F,d6 as M}from"./react-vendor-xYZnmIII.js";import{T as S}from"./table-filter-BQQ7Rmfc.js";import{T as _}from"./table-footer-Dfs_f5Wf.js";import{T as D}from"./table-header-CjMHr8CW.js";import{a,l,m as r,B as P,aE as E,aF as $,aG as p,aH as h}from"./ui-components-CQM92IK3.js";import{D as B}from"./layout-DC6VQ8xV.js";import I from"./payouts-table-columns-BhsCU-rt.js";import W from"./withdraw-form-DG9pQNf4.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./use-lang-Dg6I_Fym.js";import"./debounce-CWHP_ANh.js";import"./route-D0xh7FtZ.js";import"./table-page-size-CzF8rJAG.js";import"./interactive-vendor-B1OgcAgP.js";import"./main-CnGu8e_N.js";import"./theme-colors-CLpwvDr4.js";import"./appearance-5ivIjthu.js";import"./language-C7bQIqs2.js";import"./notification-C3MPMjX2.js";import"./app-logo-BQGZ7CFC.js";import"./input-error-_LAmvivg.js";import"./loading-button-D7aXR3K4.js";import"./inertia-FIn3q7f1.js";const q=t=>{var c;const{payouts:i,totalEarnings:j,totalPayouts:u,pendingPayouts:g,availableForWithdrawal:b,translate:N}=t,{dashboard:s,button:n,common:f}=N,d=w({data:i.data,columns:I(t.translate),getCoreRowModel:M(),getSortedRowModel:F(),getFilteredRowModel:C()});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-6 grid gap-6 sm:grid-cols-2 md:grid-cols-4",children:[e.jsx(a,{children:e.jsxs(l,{className:"flex items-center gap-4 p-6",children:[e.jsx("div",{className:"bg-primary/10 rounded-lg p-2",children:e.jsx(x,{className:"text-primary h-6 w-6"})}),e.jsxs("div",{children:[e.jsx(r,{className:"text-base font-medium",children:s.total_earnings}),e.jsxs("p",{className:"mt-1 text-2xl font-bold",children:[j," $"]})]})]})}),e.jsx(a,{children:e.jsxs(l,{className:"flex items-center gap-4 p-6",children:[e.jsx("div",{className:"bg-primary/10 rounded-lg p-2",children:e.jsx(y,{className:"text-primary h-6 w-6"})}),e.jsxs("div",{children:[e.jsx(r,{className:"text-base font-medium",children:s.available}),e.jsxs("p",{className:"mt-1 text-2xl font-bold",children:[b," $"]})]})]})}),e.jsx(a,{children:e.jsxs(l,{className:"flex items-center gap-4 p-6",children:[e.jsx("div",{className:"bg-primary/10 rounded-lg p-2",children:e.jsx(v,{className:"text-primary h-6 w-6"})}),e.jsxs("div",{children:[e.jsx(r,{className:"text-base font-medium",children:s.total_payout}),e.jsxs("p",{className:"mt-1 text-2xl font-bold",children:[u," $"]})]})]})}),e.jsx(a,{children:e.jsxs(l,{className:"flex items-center gap-4 p-6",children:[e.jsx("div",{className:"bg-primary/10 rounded-lg p-2",children:e.jsx(x,{className:"text-primary h-6 w-6"})}),e.jsxs("div",{children:[e.jsx(r,{className:"text-base font-medium",children:s.requested}),e.jsxs("p",{className:"mt-1 text-2xl font-bold",children:[g," $"]})]})]})})]}),e.jsxs(a,{className:"gap-0 py-0",children:[e.jsxs("div",{className:"relative flex items-center justify-between",children:[e.jsx(S,{data:i,title:s.withdraw_list,globalSearch:!0,tablePageSizes:[10,15,20,25],routeName:"payouts.index",className:"w-full md:pr-3"}),e.jsx(W,{title:n.withdraw,handler:e.jsxs(P,{variant:"outline",className:"absolute top-5 right-6 md:static md:mr-6 md:mb-1",children:[e.jsx(T,{}),e.jsx("span",{children:n.payout_request})]})})]}),e.jsxs(E,{className:"border-border border-y",children:[e.jsx(D,{table:d}),e.jsx($,{children:(c=d.getRowModel().rows)!=null&&c.length?d.getRowModel().rows.map(o=>e.jsx(p,{"data-state":o.getIsSelected()&&"selected",children:o.getVisibleCells().map(m=>e.jsx(h,{children:R(m.column.columnDef.cell,m.getContext())},m.id))},o.id)):e.jsx(p,{children:e.jsx(h,{className:"h-24 text-center",children:f.no_results_found})})})]}),e.jsx(_,{className:"mt-1 p-5 sm:p-7",routeName:"payouts.index",paginationInfo:i})]})]})};q.layout=t=>e.jsx(B,{children:t});export{q as default};
