import{r as j,j as e,B as l,L as c,e as p,D as u,f,g,h as v,i as N,k as C,l as b}from"./index-C7Y5J1TO.js";import{M as y}from"./master-pagination-component-BErGcWEw.js";import{u as M}from"./use-get-masters-Cb8QhFzT.js";import{C as P}from"./pagination-DcGqVpvk.js";import{G as D}from"./generic-filter-CfzHACFN.js";import{B as T}from"./badge-DLmsfCsp.js";import{C as k,a as A}from"./card-DDrJ6Iia.js";import{T as E,a as F,b as d,c as a,d as B,e as n}from"./table-DmBfZH6x.js";import"./useQuery-DGaD2i6Y.js";import"./master-services-BAYa7sWP.js";import"./label-CbvzEgFe.js";import"./popover-CtxAPxyq.js";function O(){const o=[{key:"username",label:"Usuario",value:""},{key:"email",label:"Email",value:""},{key:"payment_method",label:"Método de pago",value:""}],[i,x]=j.useState(1),r=10,{masters:t,totalItems:m}=M(i,r);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(l,{asChild:!0,size:"sm",variant:"primary-soft",children:e.jsxs(c,{className:"flex gap-1",to:"/admin/administration/masters/create",children:[e.jsx(p,{}),"Crear"]})})]})]}),e.jsx(k,{className:"py-4 xl:col-span-2","x-chunk":"dashboard-01-chunk-4",children:e.jsx(A,{children:e.jsxs(E,{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(B,{children:t==null?void 0:t.map(s=>e.jsxs(d,{children:[e.jsx(n,{children:e.jsx("div",{children:s.id})}),e.jsx(n,{children:e.jsx("div",{children:s.username})}),e.jsx(n,{children:e.jsx("div",{children:s.email})}),e.jsxs(n,{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(n,{className:"text-center",children:e.jsxs("div",{children:[s.commission_percent,"%"]})}),e.jsx(n,{className:"text-center",children:e.jsx("div",{children:s.payment_method})}),e.jsx(n,{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(n,{className:"text-center",children:e.jsxs(u,{children:[e.jsx(f,{asChild:!0,children:e.jsx(l,{size:"sm",variant:"outline",children:e.jsx(g,{})})}),e.jsxs(v,{children:[e.jsx(N,{children:"Acciones"}),e.jsx(C,{}),e.jsx(b,{children:e.jsxs(c,{to:""+s.id,className:"flex",children:[e.jsx(P,{className:"mr-2 h-4 w-4"}),e.jsx("span",{children:"Modificar"})]})})]})]})})]},s.id))})]})})}),e.jsx(y,{currentPage:i,totalItems:m,itemsPerPage:r,onPageChange:x})]})}export{O as default};
