import{j as e}from"./radixui-DBNNXUn7.js";import{r as j,L as l}from"./router-ZPDjRWWZ.js";import{M as p}from"./master-pagination-component-CxDfFOcS.js";import{u}from"./use-get-masters-DTVPQ8zV.js";import{C as f}from"./pagination-CCE7qJl8.js";import{B as c,e as g,D as v,f as N,G as C,g as b,h as y,i as M,j as P}from"./index-C1-9bQes.js";import{G as D}from"./generic-filter-BigdvSBE.js";import{B as T}from"./badge-BMZJ96FB.js";import{C as A,a as E}from"./card-BaxfxC-x.js";import{T as k,a as F,b as d,c as a,d as G,e as r}from"./table-Be5yzNoc.js";import"./vendor-C0DUGSOM.js";import"./useQuery-tXf2Qa8J.js";import"./master-services-DEBO56lc.js";import"./icons-DvPHMWAM.js";import"./utils-CbOYy0fT.js";import"./label-wWBD5Ozj.js";import"./popover-D_hLgl2z.js";function Y(){const o=[{key:"username",label:"Usuario",value:""},{key:"email",label:"Email",value:""},{key:"payment_method",label:"Método de pago",value:""}],[i,m]=j.useState(1),n=10,{masters:t,totalItems:x}=u(i,n);function h(s){console.log("Filtros aplicados:",s)}return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-3xl font-bold text-primary",children:"Administrar masters"}),e.jsx("small",{className:"text-muted-foreground",children:"Aquí podrás administrar las masters de Camsoda que luego serán asociadas a los estudios y cuentas"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(D,{filtersConfig:o,onFilterApply:h}),e.jsx(c,{asChild:!0,size:"sm",variant:"primary-soft",children:e.jsxs(l,{className:"flex gap-1",to:"/admin/administration/masters/create",children:[e.jsx(g,{}),"Crear"]})})]})]}),e.jsx(A,{className:"py-4 xl:col-span-2","x-chunk":"dashboard-01-chunk-4",children:e.jsx(E,{children:e.jsxs(k,{children:[e.jsx(F,{children:e.jsxs(d,{children:[e.jsx(a,{children:"# ID"}),e.jsx(a,{children:"Username"}),e.jsx(a,{children:"Email"}),e.jsx(a,{children:"Contacto"}),e.jsx(a,{className:"text-center",children:"Porcentaje de comisión"}),e.jsx(a,{className:"text-center",children:"Método de pago"}),e.jsx(a,{className:"text-center",children:"Estado"}),e.jsx(a,{className:"text-center",children:"Actions"})]})}),e.jsx(G,{children:t==null?void 0:t.map(s=>e.jsxs(d,{children:[e.jsx(r,{children:e.jsx("div",{children:s.id})}),e.jsx(r,{children:e.jsx("div",{children:s.username})}),e.jsx(r,{children:e.jsx("div",{children:s.email})}),e.jsxs(r,{children:[e.jsxs("div",{children:["Especialista: ",s.assigned_specialist]}),e.jsxs("div",{className:"hidden text-sm text-muted-foreground md:inline",children:["#contacto: ",s.contact_number]})]}),e.jsx(r,{className:"text-center",children:e.jsxs("div",{children:[s.commission_percent,"%"]})}),e.jsx(r,{className:"text-center",children:e.jsx("div",{children:s.payment_method})}),e.jsx(r,{className:"text-center",children:e.jsx("div",{children:e.jsx(T,{variant:s.status?"success-soft":"danger-soft",children:s.status?"Activa":"Inactiva"})})}),e.jsx(r,{className:"text-center",children:e.jsxs(v,{children:[e.jsx(N,{asChild:!0,children:e.jsx(c,{size:"sm",variant:"outline",children:e.jsx(C,{})})}),e.jsxs(b,{children:[e.jsx(y,{children:"Acciones"}),e.jsx(M,{}),e.jsx(P,{children:e.jsxs(l,{to:""+s.id,className:"flex",children:[e.jsx(f,{className:"mr-2 h-4 w-4"}),e.jsx("span",{children:"Modificar"})]})})]})]})})]},s.id))})]})})}),e.jsx(p,{currentPage:i,totalItems:x,itemsPerPage:n,onPageChange:m})]})}export{Y as default};
