import{defineComponent as h,computed as m,createVNode as e,Fragment as g}from"vue";import b from"../_util/classNames.mjs";import{filterEmpty as v}from"../_util/props-util/index.mjs";import E from"../grid/Col.mjs";import F from"./ErrorList.mjs";import{useInjectForm as $,useProvideForm as w,useProvideFormItemPrefix as V}from"./context.mjs";const B=h({compatConfig:{MODE:3},slots:Object,inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status","marginBottom","onErrorVisibleChanged"],setup(o,{slots:t}){const n=$(),{wrapperCol:c}=n,l={...n};return delete l.labelCol,delete l.wrapperCol,w(l),V({prefixCls:m(()=>o.prefixCls),status:m(()=>o.status)}),()=>{const{prefixCls:u,wrapperCol:d,marginBottom:s,onErrorVisibleChanged:f,help:C=t.help?.(),errors:a=v(t.errors?.()),extra:i=t.extra?.()}=o,r=`${u}-item`,p=d||c?.value||{},x=b(`${r}-control`,p.class);return e(E,{...p,class:x},{default:()=>e(g,null,[e("div",{class:`${r}-control-input`},[e("div",{class:`${r}-control-input-content`},[t.default?.()])]),s!==null||a.length?e("div",{style:{display:"flex",flexWrap:"nowrap"}},[e(F,{errors:a,help:C,class:`${r}-explain-connected`,onErrorVisibleChanged:f},null),!!s&&e("div",{style:{width:0,height:`${s}px`}},null)]):null,i?e("div",{class:`${r}-extra`},[i]):null])})}}});export{B as default};
