import{r as i,a7 as v,h as g,e as I,n as c,g as d,J as h,u as x}from"./vue-vendor-CxLCUzY4.js";import{a5 as C,ak as F}from"./antd-vue-vendor-CahNzUUa.js";function E(s,o="value",l="change",m){const a=d(),n=a==null?void 0:a.emit,r=C.useInjectFormItemContext(),t=i({value:s[o]}),u=v(t),f=e=>{t.value=e};return g(()=>{t.value=s[o]}),[I({get(){return t.value==null?"":t.value},set(e){F(e,u.value)||(t.value=e,c(()=>{n==null||n(l,e,...h(x(m))||[]),c(()=>r.onFieldChange())}))}}),f,u,r]}export{E as useRuleFormItem};
