const e=require("../../_util/type.js"),t=require("../../_util/classNames.js"),n=require("../../vc-util/isMobile.js");let r=require("vue");var i=200,a=600,o=(0,r.defineComponent)({compatConfig:{MODE:3},name:`StepHandler`,inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:e.functionType()},slots:Object,setup(e,{slots:o,emit:s}){let c=(0,r.ref)(),l=(e,t)=>{e.preventDefault(),s(`step`,t);function n(){s(`step`,t),c.value=setTimeout(n,i)}c.value=setTimeout(n,a)},u=()=>{clearTimeout(c.value)};return(0,r.onBeforeUnmount)(()=>{u()}),()=>{if(n.default())return null;let{prefixCls:i,upDisabled:a,downDisabled:s}=e,c=`${i}-handler`,d=t.default(c,`${c}-up`,{[`${c}-up-disabled`]:a}),f=t.default(c,`${c}-down`,{[`${c}-down-disabled`]:s}),p={unselectable:`on`,role:`button`,onMouseup:u,onMouseleave:u},{upNode:m,downNode:h}=o;return(0,r.createVNode)(`div`,{class:`${c}-wrap`},[(0,r.createVNode)(`span`,{...p,onMousedown:e=>{l(e,!0)},"aria-label":`Increase Value`,"aria-disabled":a,class:d},[m?.()||(0,r.createVNode)(`span`,{unselectable:`on`,class:`${i}-handler-up-inner`},null)]),(0,r.createVNode)(`span`,{...p,onMousedown:e=>{l(e,!1)},"aria-label":`Decrease Value`,"aria-disabled":s,class:f},[h?.()||(0,r.createVNode)(`span`,{unselectable:`on`,class:`${i}-handler-down-inner`},null)])])}}});exports.default=o;