import{_ as g}from"./DuWt9Bdf.js";import{u as m}from"./CRcHJ3HU.js";import{f,s as w,x as C,h as E,C as R,y as T,o as a,m as I,w as v,a as t,t as o,c,F as A,A as O,k as S,q as N,p as k,e as L,b as P}from"./YTYhyFR4.js";import{_ as B}from"./DlAUqK2U.js";import{u as M}from"./DmFLhtjE.js";import"./Ca5uvwMn.js";import"./y_BXiV4o.js";const h=s=>(k("data-v-d485f958"),s=s(),L(),s),F=h(()=>t("h1",{class:"text-center text-2xl font-bold mb-6"},"Lista de Resultados",-1)),U={class:"text-center"},V={class:"table-auto w-full"},$=h(()=>t("thead",null,[t("tr",null,[t("th",{class:"px-4 py-2 bg-primary text-white font-bold"},"Posición"),t("th",{class:"px-4 py-2 bg-primary text-white font-bold"},"Nombre"),t("th",{class:"px-4 py-2 bg-primary text-white font-bold"},"Puntos")])],-1)),q={class:"border px-4 py-2 font-bold"},z={class:"border px-4 py-2 font-bold"},D={class:"border px-4 py-2 font-bold"},H=f({__name:"results",setup(s){const{getCount:_,getCurrentPool:p,getPoolResults:r}=m(),{pool:j,count:b,results:d}=w(m());C("user");const u=E(!1),x=R(()=>d.value.filter(e=>e.ACIERTO_TOTALES>=7).length);return T(async()=>{var n;u.value=!0,await _();let e=(n=b.value.body[0])==null?void 0:n.NUMERO_QUINIELA;e&&(await p(e-1),await r(e-1),u.value=!1)}),(e,n)=>{const y=g;return a(),I(y,{class:"p-8"},{default:v(()=>[F,t("p",U,"Participantes ganadores: "+o(x.value),1),t("table",V,[$,t("tbody",null,[(a(!0),c(A,null,O(S(d),(l,i)=>(a(),c("tr",{key:i,class:N({"green-row":l.ACIERTO_TOTALES>=7})},[t("td",q,o(i+1),1),t("td",z,o(l.NOMBRE),1),t("td",D,o(l.ACIERTO_TOTALES),1)],2))),128))])])]),_:1})}}}),Q=B(H,[["__scopeId","data-v-d485f958"]]),tt=f({__name:"results",setup(s){return M({title:"Resultados"}),(_,p)=>{const r=Q;return a(),c("div",null,[P(r)])}}});export{tt as default};
