import{e as n}from"./index-M_JNBppB.js";import{j as u,X as s}from"./vue-BJk78QHK.js";function h(v,a){const r=(o=[])=>{o.forEach(t=>{t.style.forEach(e=>{e.key&&(a.value.style[e.key]=e.value)})})},l=o=>{const t=v.value.data.filter(e=>e.id===o&&e.event==="v-click");r(t)},c=o=>{const t=v.value.data.filter(e=>e.id===o&&e.event==="v-hover");r(t)},f=o=>{const t=v.value.data.filter(e=>e.id===o&&e.event==="v-blur");r(t)};return u(()=>{const{data:o,duration:t}=v.value||{};o!=null&&o.length&&(a.value.style.transition=`all ${t}s`),(o==null?void 0:o.length)>0&&(n.$on("v-click",l),n.$on("v-hover",c),n.$on("v-blur",f))}),s(()=>{var o,t;((t=(o=v.value)==null?void 0:o.data)==null?void 0:t.length)>0&&(n.$off("v-click",l),n.$off("v-hover",c),n.$off("v-blur",f))}),{}}export{h as u};
