(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,27612,e=>{"use strict";let t=(0,e.i(75254).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],27612)},7233,e=>{"use strict";let t=(0,e.i(75254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],7233)},88511,e=>{"use strict";let t=(0,e.i(75254).default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);e.s(["Edit",()=>t],88511)},40606,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(17927),r=e.i(7233),i=e.i(88511),l=e.i(27612),d=e.i(22016);function n(){let[e,n]=(0,s.useState)([]),[c,o]=(0,s.useState)(!0);(0,s.useEffect)(()=>{x()},[]);let x=async()=>{let{data:e,error:t}=await a.supabase.from("team_members").select("*").order("order_index",{ascending:!0});t||n(e||[]),o(!1)},h=async e=>{if(!confirm("¿Estás seguro de eliminar a este integrante del equipo?"))return;let{error:t}=await a.supabase.from("team_members").delete().eq("id",e);t||x()};return(0,t.jsxs)("div",{className:"space-y-10",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-3xl font-serif font-bold text-navy tracking-tight mb-2",children:"Gestión de Equipo"}),(0,t.jsx)("p",{className:"text-sm font-bold text-navy/40 tracking-widest uppercase",children:"Administra los integrantes de la institución"})]}),(0,t.jsxs)(d.default,{href:"/gestion-corpadein/equipo/nuevo",className:"flex items-center gap-2 bg-navy text-white px-8 py-4 font-bold tracking-widest uppercase hover:bg-navy/90 transition-all shadow-[6px_6px_0px_#FFC72C]",children:[(0,t.jsx)(r.Plus,{size:18})," NUEVO INTEGRANTE"]})]}),c?(0,t.jsx)("div",{className:"flex justify-center py-20",children:(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-navy"})}):(0,t.jsx)("div",{className:"bg-white shadow-sm border border-gray-100 overflow-hidden",children:(0,t.jsxs)("table",{className:"w-full text-left",children:[(0,t.jsx)("thead",{className:"bg-gray-50 border-b border-gray-100",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"px-8 py-6 text-[10px] font-bold text-navy/40 uppercase tracking-widest",children:"Imagen"}),(0,t.jsx)("th",{className:"px-8 py-6 text-[10px] font-bold text-navy/40 uppercase tracking-widest",children:"Nombre"}),(0,t.jsx)("th",{className:"px-8 py-6 text-[10px] font-bold text-navy/40 uppercase tracking-widest",children:"Cargo"}),(0,t.jsx)("th",{className:"px-8 py-6 text-[10px] font-bold text-navy/40 uppercase tracking-widest text-right",children:"Acciones"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-gray-100",children:0===e.length?(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:4,className:"px-8 py-20 text-center text-gray-400 font-serif italic",children:"No hay integrantes registrados aún."})}):e.map(e=>(0,t.jsxs)("tr",{className:"hover:bg-gray-50/50 transition-colors",children:[(0,t.jsx)("td",{className:"px-8 py-4",children:(0,t.jsx)("div",{className:"relative w-12 h-12 rounded-full bg-gray-100 overflow-hidden border border-gray-100",children:e.image_url&&(0,t.jsx)("img",{src:e.image_url,alt:"",className:"w-full h-full object-cover"})})}),(0,t.jsx)("td",{className:"px-8 py-4",children:(0,t.jsx)("span",{className:"font-bold text-navy text-sm",children:e.name})}),(0,t.jsx)("td",{className:"px-8 py-4 text-xs font-bold text-navy/40",children:e.role}),(0,t.jsx)("td",{className:"px-8 py-4 text-right",children:(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,t.jsx)(d.default,{href:`/gestion-corpadein/equipo/edit/${e.id}`,className:"p-2 text-navy hover:bg-navy/5 rounded-lg transition-all",children:(0,t.jsx)(i.Edit,{size:18})}),(0,t.jsx)("button",{onClick:()=>h(e.id),className:"p-2 text-red-500 hover:bg-red-50 rounded-lg transition-all",children:(0,t.jsx)(l.Trash2,{size:18})})]})})]},e.id))})]})})]})}e.s(["default",()=>n])}]);