/* Copyright © 2024 Melbet - All Rights Reserved */ import{useGlobalStore as T,BettingPageType as S,GLOBAL_CHAMP_NAME as B,_export_sfc as _,__nuxt_component_0$1 as f,useCookies as E,serverStorageShallowRef as l,FIRST_GAME_START_TIMESTAMP as P}from"./entry-Bl6dkD65.js";import{computed as I,defineComponent as u,openBlock as c,createBlock as g,withCtx as h,createElementVNode as i,createElementBlock as p,renderSlot as y,resolveComponent as A,createVNode as M,Fragment as m,renderList as d,createTextVNode as D,onMounted as v,nextTick as G,watch as x}from"../../../../shared-assets/__shared_vue_deps_SRT2KB67.js";import{MEDIA_KEY_WEBP as N}from"./qhWnbZlNzzBv.js";import{useBettingChangeRouteMethods as w}from"./BMeLkXmUL-Ra.js";import{useTimeSettings as U}from"./BvEaOW-X6OLZ.js";const C=()=>{const e=T(),{getBettingRouteUrl:t}=w();return I(()=>t({lng:e.getLanguage,pageType:S.CHAMP}))},R=u({name:"ChampInfoLogo",setup(){const e=C();return{MEDIA_KEY_WEBP:N,GLOBAL_CHAMP_NAME:B,champPageLink:e}}}),b=["srcset"],F=["src","srcset","alt"];function H(e,t,o,n,a,r){const s=f;return c(),g(s,{to:e.champPageLink,class:"champ-info-logo"},{default:h(()=>[i("picture",null,[i("source",{srcset:`${e.$mediaUrl("championship_info_logo",e.MEDIA_KEY_WEBP)} 1x, ${e.$mediaUrl("championship_info_logo_x2",e.MEDIA_KEY_WEBP)} 2x`,type:"image/webp"},null,8,b),i("img",{src:e.$mediaUrl("championship_info_logo"),srcset:e.$mediaUrl("championship_info_logo_x2"),alt:e.GLOBAL_CHAMP_NAME},null,8,F)])]),_:1},8,["to"])}const Z=_(R,[["render",H]]),K=u({name:"ChampInfoGradient"}),V={class:"champ-info-gradient"};function W(e,t,o,n,a,r){return c(),p("div",V,[y(e.$slots,"default",{},void 0,!0)])}const Y=_(K,[["render",W],["__scopeId","data-v-7dcb1f27"]]),O=u({name:"ChampInfoTicker",components:{ChampInfoGradient:Y},setup(){return{champPageLink:C()}}});function z(e,t,o,n,a,r){const s=A("ChampInfoGradient"),k=f;return c(),g(k,{to:e.champPageLink},{default:h(()=>[M(s,{class:"champ-info-ticker"},{default:h(()=>[(c(),p(m,null,d(2,$=>i("span",{key:$,class:"champ-info-ticker__text"},[(c(),p(m,null,d(6,L=>(c(),p(m,{key:L},[D(" • EU • 2024 • Germany ")],64))),64))])),64))]),_:1})]),_:1},8,["to"])}const ee=_(O,[["render",z],["__scopeId","data-v-1127305a"]]),te=()=>{const{timezone:e}=U(),t=E(),o=P-Date.now()/1e3,n=()=>t.get("isChampStarted")||o<=0,a=()=>t.get("isLessThanThreeDaysBeforeStartChamp")||o<=864e5*4,r=l(n(),"isChampStarted"),s=l(a(),"isLessThanThreeDaysBeforeStartChamp");return v(async()=>{await G(),r.value=n(),s.value=a()}),x(e,()=>{r.value=n(),s.value=a()}),{millisecondsBeforeStart:o,isChampStarted:r,isLessThanThreeDaysBeforeStartChamp:s,checkLessThanThreeDaysBeforeStartChamp:a,checkChampStarted:n}};export{Y as ChampInfoGradient,Z as ChampInfoLogo,ee as ChampInfoTicker,C as useChampPageLink,te as useCheckChampDates};