import{L as v,Z as f,r as c,B as x,U as u,b,C as o,D as n,f as t,$ as w,K as y,N as e,O as r,I as g}from"./DCkWqTry.js";const h=window.setInterval,k={key:0,class:"flex flex-row gap-4"},I={class:"timer__unit-wrapper"},O={class:"text-lg font-bold card__timer-value"},T={class:"timer__unit-wrapper"},C={class:"text-lg font-bold card__timer-value"},j={class:"timer__unit-wrapper"},D={class:"text-lg font-bold card__timer-value"},M={class:"timer__unit-wrapper timer__unit-wrapper--secs"},S={class:"text-lg font-bold card__timer-value"},B=v({name:"FixtureCountdownTimer",__name:"index",props:{eventTime:{},label:{},theme:{}},setup(p){const _=p,m=f(),a=c(),i=c(),d=c();return x(()=>{i.value=u.fromISO(_.eventTime),d.value=h(()=>{const l=u.local();a.value=i.value.diff(l,["days","hours","minutes","seconds"]).toObject(),i.value.diff(l).as("seconds")<=0&&(a.value=null)},1e3)}),b(()=>clearInterval(d.value)),(l,s)=>(o(),n("section",null,[t(a)&&t(m).default?(o(),n("div",k,[w(l.$slots,"default",{remaining:t(a)})])):t(a)?(o(),n("div",{key:1,class:y(["flex flex-row gap-4",{"text-white":l.theme==="club"||l.theme==="dark","text-gray-900":l.theme==="light"}])},[e("div",I,[e("p",O,r(t(a).days),1),s[0]||(s[0]=e("p",{class:"opacity-70 card__timer-label"}," Days ",-1))]),e("div",T,[e("p",C,r(t(a).hours),1),s[1]||(s[1]=e("p",{class:"opacity-70 card__timer-units"}," Hours ",-1))]),e("div",j,[e("p",D,r(t(a).minutes),1),s[2]||(s[2]=e("p",{class:"opacity-70 card__timer-label"}," Mins ",-1))]),e("div",M,[e("p",S,r(Math.floor(t(a).seconds)),1),s[3]||(s[3]=e("p",{class:"opacity-70 card__timer-label"}," Secs ",-1))])],2)):g("",!0)]))}});export{B as _};