import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{et as t}from"./vendor-primevue-7po8Zk9v.js";import{$ as n,A as r,Bt as i,D as a,E as o,F as s,Ft as c,L as l,Lt as u,W as d,ht as f,k as p,lt as m}from"./vendor-vue-core-D3IvUUeM.js";import{t as h}from"./Button-mG8zDgxj.js";import{t as g}from"./Slider-Bn8frMD_.js";var _={key:0,class:`pointer-events-auto absolute top-0 left-0 z-10 flex w-full flex-col items-center gap-2 pt-2`},v={class:`flex items-center justify-center gap-2`},y={class:`flex w-full max-w-xs items-center gap-2 px-4`},b={class:`min-w-16 text-xs text-base-foreground`},x=l({__name:`AnimationControls`,props:{animations:{},animationsModifiers:{},playing:{type:Boolean},playingModifiers:{},selectedSpeed:{},selectedSpeedModifiers:{},selectedAnimation:{},selectedAnimationModifiers:{},animationProgress:{default:0},animationProgressModifiers:{},animationDuration:{default:0},animationDurationModifiers:{}},emits:d([`seek`],[`update:animations`,`update:playing`,`update:selectedSpeed`,`update:selectedAnimation`,`update:animationProgress`,`update:animationDuration`]),setup(e,{emit:l}){let d=m(e,`animations`),x=m(e,`playing`),S=m(e,`selectedSpeed`),C=m(e,`selectedAnimation`),w=m(e,`animationProgress`),T=m(e,`animationDuration`),E=l,D=[{name:`0.1x`,value:.1},{name:`0.5x`,value:.5},{name:`1x`,value:1},{name:`1.5x`,value:1.5},{name:`2x`,value:2}],O=o(()=>T.value?w.value/100*T.value:0);function formatTime(e){let t=Math.floor(e/60),n=(e%60).toFixed(1);return t>0?`${t}:${n.padStart(4,`0`)}`:`${n}s`}function togglePlay(){x.value=!x.value}function handleSliderChange(e){if(!e)return;let t=e[0];w.value=t,E(`seek`,t)}return(e,o)=>d.value&&d.value.length>0?(n(),r(`div`,_,[a(`div`,v,[s(h,{size:`icon`,variant:`textonly`,class:`rounded-full`,"aria-label":e.$t(`g.playPause`),onClick:togglePlay},{default:f(()=>[a(`i`,{class:u([`pi`,x.value?`pi-pause`:`pi-play`,`text-lg text-base-foreground`])},null,2)]),_:1},8,[`aria-label`]),s(c(t),{modelValue:S.value,"onUpdate:modelValue":o[0]||=e=>S.value=e,options:D,"option-label":`name`,"option-value":`value`,class:`w-24`},null,8,[`modelValue`]),s(c(t),{modelValue:C.value,"onUpdate:modelValue":o[1]||=e=>C.value=e,options:d.value,"option-label":`name`,"option-value":`index`,class:`w-32`},null,8,[`modelValue`,`options`])]),a(`div`,y,[s(g,{"model-value":[w.value],min:0,max:100,step:.1,class:`flex-1`,"onUpdate:modelValue":handleSliderChange},null,8,[`model-value`]),a(`span`,b,i(formatTime(O.value))+` / `+i(formatTime(T.value)),1)])])):p(``,!0)}});export{x as t};
//# sourceMappingURL=AnimationControls-B7Thj1Zy.js.map