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

AltStyle によって変換されたページ (->オリジナル) /