PageSourceSearch

https://flfproleague.com/assets/SquadsList-BXzy_03I.js

js flfproleague.com collected 2026-10-05 23:12:43 UTC 4,711 bytes, 1 lines download raw bytes

1import{N as g,f as y,P as k,Y as v,j as t,O as _,x as o,y as C,a1 as S,k as d,b as E}from"./index-CtR2Cm7C.js";import{B as M}from"./button-2frSB4pm.js";import{V as R}from"./VerifiedBadge-CPzZ0bpR.js";import{M as m}from"./medal-ByCgqxVK.js";import{C as A}from"./circle-BjKv542x.js";import"./index-OxmuvU-r.js";import"./TeamHeraldicVerification-CevnxECq.js";import"./shield-check-D6RITCT8.js";const $={1:{border:"border-yellow-500/30",accent:"#f59e0b",icon:_},2:{border:"border-slate-400/20",accent:"#94a3b8",icon:m},3:{border:"border-orange-500/20",accent:"#f97316",icon:m}};function T({squads:x,type:h,maxSquads:c}){const r=g(),{user:B}=r,p=y(),f=r.isAdmin||r.can(k.BLOCK_CREATE),u=v({mutationFn:async e=>{const s=await E.functions.invoke("manageSquadOperations",{action:"delete",squad_id:e});if(!s.data?.success)throw new Error(s.data?.error||"No se pudo eliminar el squad");return s.data},onSuccess:()=>{p.invalidateQueries({queryKey:["bloque-squads"]}),d.success("Retirado del bloque exitosamente")},onError:e=>d.error(e.response?.data?.error||e.message||"Error al retirarse del bloque")}),b=e=>r.owns(e)||f,a=x.filter(e=>e.type===h&&e.active).sort((e,s)=>e.slot_number&&s.slot_number?e.slot_number-s.slot_number:e.slot_number?-1:s.slot_number?1:new Date(e.created_date)-new Date(s.created_date)).slice(0,c),j=Math.max(0,c-a.length);return t.jsxs("div",{className:"space-y-2.5",children:[a.map((e,s)=>{const i=s+1,n=$[i]||{border:"border-white/[0.07]",accent:"#ffffff30",icon:null},l=n.icon;return t.jsxs(o.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:s*.04},className:`flex items-center gap-3 bg-white/[0.04] border ${n.border} rounded-2xl p-3.5`,children:[t.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:n.accent+"18"},children:l?t.jsx(l,{className:"w-3.5 h-3.5",style:{color:n.accent}}):t.jsx("span",{className:"text-xs font-bold",style:{color:n.accent},children:i})}),e.logo_url?t.jsx("img",{src:e.logo_url,alt:e.name,className:"w-10 h-10 rounded-xl object-cover flex-shrink-0"}):t.jsx("div",{className:"w-10 h-10 rounded-xl bg-white/[0.08] flex items-center justify-center flex-shrink-0",children:t.jsx("span",{className:"text-white font-black text-base",children:e.name.charAt(0)})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("p",{className:"text-white font-bold text-sm truncate",children:e.name}),t.jsx(R,{verified:e.verified,size:"md"})]}),t.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[t.jsxs("span",{className:"text-white/30 text-[11px]",children:["Casilla #",e.slot_number||i]}),e.captain&&t.jsxs("span",{className:"text-white/20 text-[11px]",children:["· ",e.captain]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[t.jsxs("div",{className:"text-center hidden sm:block",children:[t.jsx("p",{className:"text-white font-bold text-sm",children:e.points||0}),t.jsx("p",{className:"text-white/25 text-[9px] uppercase",children:"pts"})]}),t.jsxs("div",{className:"text-center hidden sm:block",children:[t.jsx("p",{className:"text-white font-bold text-sm",children:e.kills||0}),t.jsx("p",{className:"text-white/25 text-[9px] uppercase",children:"kills"})]}),t.jsx("div",{className:`flex items-center justify-center w-8 h-8 rounded-lg flex-shrink-0 ${e.checked_in?"bg-green-500/15":"bg-red-500/15"}`,title:e.checked_in?"Check-in completado":"Check-in pendiente",children:e.checked_in?t.jsx(C,{className:"w-4 h-4 text-green-400"}):t.jsx(A,{className:"w-4 h-4 text-red-400"})}),b(e)&&t.jsx(M,{onClick:w=>{w.stopPropagation();const N=r.owns(e)?`¿Retirarte de "${e.name}"?`:`¿Eliminar "${e.name}"?`;confirm(N)&&u.mutate(e.id)},variant:"ghost",size:"icon",className:"h-8 w-8 text-white/20 hover:text-red-400 hover:bg-red-500/10",children:t.jsx(S,{className:"w-3.5 h-3.5"})})]})]},e.id)}),[...Array(j)].map((e,s)=>t.jsxs(o.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:(a.length+s)*.03},className:"flex items-center gap-3 border border-dashed border-white/[0.07] rounded-2xl px-4 py-3.5",children:[t.jsx("div",{className:"w-7 h-7 rounded-lg bg-white/[0.04] flex items-center justify-center flex-shrink-0",children:t.jsxs("span",{className:"text-white/20 text-xs font-bold",children:["#",a.length+s+1]})}),t.jsx("div",{className:"w-10 h-10 rounded-xl border border-dashed border-white/[0.08] flex items-center justify-center flex-shrink-0",children:t.jsx("span",{className:"text-white/15 text-lg",children:"?"})}),t.jsx("div",{children:t.jsx("p",{className:"text-white/20 text-sm font-medium",children:"Slot Disponible"})})]},`empty-${s}`))]})}export{T 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.