import{nextTick as o}from"vue";import{getOptionProps as n}from"./props-util/index.mjs";const h={methods:{setState(e={},s){let t=typeof e=="function"?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){const i=this.getDerivedStateFromProps(n(this),{...this.$data,...t});if(i===null)return;t={...t,...i||{}}}Object.assign(this.$data,t),this._.isMounted&&this.$forceUpdate(),o(()=>{s&&s()})},__emit(){const e=[].slice.call(arguments,0);let s=e[0];s=`on${s[0].toUpperCase()}${s.substring(1)}`;const t=this.$props[s]||this.$attrs[s];if(e.length&&t)if(Array.isArray(t))for(let i=0,r=t.length;i<r;i++)t[i](...e.slice(1));else t(...e.slice(1))}}};export{h as default};
