import{u as V,s as C,r as s,o as S,c as r,a as v,b as u,d as t,w as l,e as m,v as R,f as h,t as _,n as b,T as x,g as B,_ as g,h as D,i as F,j as n}from"./index-DsXh811X.js";const I=["src"],j=["src"],z={key:1,class:"grow bg-cover flex flex-col justify-around items-center",appear:""},A={__name:"EndView",setup(N){const e=V(),{story:k}=C(e),o=s(e.naturalFlow),d=s(0),y=s(0),c=s(e.currentRoute.buttonDelay),i=s(e.currentRoute.textDelay);S(()=>{o.value&&e.currentRoute.buttonDelay&&(y.value=setTimeout(()=>{c.value=!1},parseFloat(e.currentRoute.buttonDelay))),o.value&&e.currentRoute.textDelay&&(d.value=setTimeout(()=>{i.value=!1},parseFloat(e.currentRoute.textDelay))),e.flagResetCheck()});function p(f){!o.value&&e.currentRoute.buttonDelay&&(y.value=setTimeout(()=>{c.value=!1},parseFloat(e.currentRoute.buttonDelay))),!o.value&&e.currentRoute.textDelay&&(d.value=setTimeout(()=>{i.value=!1},parseFloat(e.currentRoute.textDelay))),o.value=f}return(f,a)=>{const w=B("router-link");return o.value?(n(),r("section",{key:0,class:b(["grow bg-cover flex flex-col justify-center items-center",t(e).displayedRoute?.buttonsVAlign]),style:F({backgroundImage:`url(${t(e).displayedRoute?.bgImage})`})},[t(e).displayedRoute?.bgVideo?(n(),r("video",{key:0,class:"absolute h-screen pointer-events-none object-cover w-full",muted:"",src:t(e).displayedRoute?.bgVideo,autoplay:"",loop:""},null,8,I)):v("",!0),u(x,{appear:""},{default:l(()=>[m(h("p",{class:b(["font-secondary z-10",t(k)?.style?.textBox])},_(t(e).displayedRoute?.text),3),[[R,!i.value]])]),_:1}),u(x,{appear:""},{default:l(()=>[m(u(w,{class:"z-10",to:"/"},{default:l(()=>[u(g,{onClick:a[0]||(a[0]=T=>p(!0))},{default:l(()=>[...a[2]||(a[2]=[D("Retour au départ ",-1)])]),_:1})]),_:1},512),[[R,!c.value]])]),_:1}),t(e).displayedRoute?.bgAudio?(n(),r("audio",{key:1,src:t(e).displayedRoute.bgAudio,autoplay:""},null,8,j)):v("",!0)],6)):(n(),r("section",z,[u(g,{onClick:a[1]||(a[1]=T=>p(!0))},{default:l(()=>[D("Lancer la scene -> "+_(t(e).currentRoute.id),1)]),_:1})]))}}};export{A as default};
