"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),g=require("lodash-unified");require("../../config-provider/index.js");const h=require("./style/index.js"),V=require("../../config-provider/hooks/use-locale.js"),R=require("../../config-provider/hooks/use-namespace.js"),b=e.defineComponent({name:"ApInputRadio",__name:"ApInputRadio",props:{disabled:{type:Boolean},stringMode:{type:Boolean,default:!0},precision:{},max:{},min:{},step:{},bordered:{type:Boolean,default:!0},autofocus:{type:Boolean},decimalSeparator:{},controls:{type:Boolean,default:!0},formatter:{},onInput:{},onChange:{},onPressEnter:{},onStep:{},onBlur:{},onFocus:{},value:{},options:{},onInputRadioChange:{},setRadioValCallback:{}},emits:["update:value","InputRadioChange"],setup(r,{emit:s}){const i=u.Form.useInjectFormItemContext(),a=r,{t:p}=V.useLocale(),{b:c,e:d}=R.useNamespace("ap-input-radio"),m=h.default("ap-input-radio"),l=s,n=o=>{let t={...a.value,...o};l("update:value",t),l("InputRadioChange",t),i.onFieldChange()},f=o=>{n({inputVal:o})},v=o=>{const t=o.target.value;if(a.setRadioValCallback){let C=a.setRadioValCallback(t);n({inputVal:C,radioVal:t})}else n({radioVal:t})};return e.onMounted(()=>{if(a.setRadioValCallback){let o=a.setRadioValCallback(a.value.radioVal);n({inputVal:o})}}),(o,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(c)(),e.unref(m)])},[e.createVNode(e.unref(u.InputNumber),e.mergeProps({class:e.unref(d)("input-number")},e.unref(g.omit)(a,["value","options"]),{value:a.value?a.value?.inputVal:"",placeholder:e.unref(p)("ap.common.inputText"),onChange:f}),null,16,["class","value","placeholder"]),e.createVNode(e.unref(u.RadioGroup),{value:a.value?a.value?.radioVal:"",options:a.options,onChange:v},null,8,["value","options"])],2))}});exports.default=b;
