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