"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("@aplus-frontend/antdv"),b=require("lodash-unified");require("../../hooks/index.js");const y=require("../../hooks/useControllableValue.js"),h=e.defineComponent({name:"ApFieldRate",__name:"index",props:{mode:{default:"edit"},class:{},style:{},customReadMode:{},prefixCls:{},count:{default:5},value:{},allowHalf:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!0},tooltips:{},disabled:{type:Boolean,default:void 0},character:{default:void 0},autofocus:{type:Boolean,default:!1},keyboard:{type:Boolean},tabindex:{},direction:{},id:{},onChange:{},onHoverChange:{},"onUpdate:value":{},onFocus:{},onBlur:{},onKeydown:{},size:{},defaultValue:{}},emits:["update:value"],setup(o,{expose:l,emit:u}){const t=o,r=e.computed(()=>b.omit(t,["mode","defaultValue"])),a=e.shallowRef(),n=u,s=e.useSlots(),{value:d,updateValue:c}=y.useControllableValue(t,n),i=e.computed(()=>t.mode==="read"?!0:t.disabled);function f(){a.value?.focus?.()}function p(){a.value?.blur?.()}return l({focus:f,blur:p}),(v,_)=>(e.openBlock(),e.createBlock(e.unref(m.Rate),e.mergeProps(r.value,{ref_key:"rateRef",ref:a,value:e.unref(d),disabled:i.value,"onUpdate:value":e.unref(c)}),e.createSlots({_:2},[s.character?{name:"character",fn:e.withCtx(()=>[e.renderSlot(v.$slots,"character")]),key:"0"}:void 0]),1040,["value","disabled","onUpdate:value"]))}});exports.default=h;
