import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{et as t}from"./vendor-primevue-DxVRNMbC.js";import{A as n,D as r,G as i,I as a,It as o,O as s,R as c,Rt as l,Vt as u,et as d,gt as f,j as p,ut as m}from"./vendor-vue-core-X6q-rGJs.js";import{t as h}from"./Button-C7dWyQyS.js";import{t as g}from"./Slider-DwzHlmqT.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=c({__name:`AnimationControls`,props:{animations:{},animationsModifiers:{},playing:{type:Boolean},playingModifiers:{},selectedSpeed:{},selectedSpeedModifiers:{},selectedAnimation:{},selectedAnimationModifiers:{},animationProgress:{default:0},animationProgressModifiers:{},animationDuration:{default:0},animationDurationModifiers:{}},emits:i([`seek`],[`update:animations`,`update:playing`,`update:selectedSpeed`,`update:selectedAnimation`,`update:animationProgress`,`update:animationDuration`]),setup(e,{emit:i}){let c=m(e,`animations`),x=m(e,`playing`),S=m(e,`selectedSpeed`),C=m(e,`selectedAnimation`),w=m(e,`animationProgress`),T=m(e,`animationDuration`),E=i,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=r(()=>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,r)=>c.value&&c.value.length>0?(d(),p(`div`,_,[s(`div`,v,[a(h,{size:`icon`,variant:`textonly`,class:`rounded-full`,"aria-label":e.$t(`g.playPause`),onClick:togglePlay},{default:f(()=>[s(`i`,{class:l([`pi`,x.value?`pi-pause`:`pi-play`,`text-lg text-base-foreground`])},null,2)]),_:1},8,[`aria-label`]),a(o(t),{modelValue:S.value,"onUpdate:modelValue":r[0]||=e=>S.value=e,options:D,"option-label":`name`,"option-value":`value`,class:`w-24`},null,8,[`modelValue`]),a(o(t),{modelValue:C.value,"onUpdate:modelValue":r[1]||=e=>C.value=e,options:c.value,"option-label":`name`,"option-value":`index`,class:`w-32`},null,8,[`modelValue`,`options`])]),s(`div`,y,[a(g,{"model-value":[w.value],min:0,max:100,step:.1,class:`flex-1`,"onUpdate:modelValue":handleSliderChange},null,8,[`model-value`]),s(`span`,b,u(formatTime(O.value))+` / `+u(formatTime(T.value)),1)])])):n(``,!0)}});export{x as t};
//# sourceMappingURL=AnimationControls-C9rBFNWa.js.map