"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("@aplus-frontend/antdv"),l=require("lodash-unified");require("../../hooks/index.js");const x=require("../../hooks/useControllableValue.js"),g=e.defineComponent({name:"ApFieldSlider",__name:"index",props:{mode:{},class:{},style:{},emptyText:{default:"--"},customReadMode:{},range:{type:[Boolean,Object]},value:{},defaultValue:{},onChange:{},"onUpdate:value":{},onAfterChange:{},onChangeComplete:{},handleStyle:{},trackStyle:{},prefixCls:{},reverse:{type:Boolean},min:{default:0},max:{default:100},step:{default:1},marks:{},dots:{type:Boolean},included:{type:Boolean,default:!0},disabled:{type:Boolean,default:void 0},keyboard:{type:Boolean},vertical:{type:Boolean},className:{},rootClassName:{},id:{},tooltip:{},autoFocus:{type:Boolean},styles:{},classNames:{},onFocus:{},onBlur:{},tooltipPrefixCls:{},tipFormatter:{},tooltipVisible:{type:Boolean,default:void 0},getTooltipPopupContainer:{},tooltipPlacement:{},tabIndex:{},ariaLabelForHandle:{},ariaLabelledByForHandle:{},ariaRequired:{type:Boolean},ariaValueTextFormatterForHandle:{}},emits:["update:value"],setup(r,{expose:s,emit:d}){const i=e.useSlots(),o=e.shallowRef(),a=r,p=e.computed(()=>l.omit(a,["value","onUpdate:value","mode","emptyText","defaultValue"])),c=d,{value:n,updateValue:f}=x.useControllableValue(a,c),m=e.computed(()=>{const t=e.unref(n);return l.isNil(t)?a.emptyText:l.isArray(t)?`${t[0]}-${t[1]}`:t});function y(){o.value?.focus?.()}function v(){o.value?.blur?.()}return s({focus:y,blur:v}),(t,C)=>r.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(m.value),1)],64)):(e.openBlock(),e.createBlock(e.unref(b.Slider),e.mergeProps({key:1},p.value,{ref_key:"sliderRef",ref:o,value:e.unref(n),"onUpdate:value":e.unref(f)}),e.createSlots({_:2},[e.renderList(i,(k,u)=>({name:u,fn:e.withCtx(B=>[e.renderSlot(t.$slots,u,e.normalizeProps(e.guardReactiveProps(B||{})))])}))]),1040,["value","onUpdate:value"]))}});exports.default=g;
