import{ci as j,cj as F,y as i,H as I,g as d,z as c,k as v,I as h,F as y,a1 as K,at as R,aR as S}from"./index-DpP8vbvu.js";const p={prefix:Math.floor(Math.random()*1e4),current:0},_=Symbol("elIdInjection"),D=()=>I()?i(_,p):p,$=s=>{const e=D(),o=j();return F(()=>d(s)||`${o.value}-id-${e.prefix}-${e.current++}`)},f=Symbol("formContextKey"),b=Symbol("formItemContextKey"),E=()=>{const s=i(f,void 0),e=i(b,void 0);return{form:s,formItem:e}},N=(s,{formItemContext:e,disableIdGeneration:o,disableIdManagement:n})=>{o||(o=c(!1)),n||(n=c(!1));const t=c();let u;const a=v(()=>{var l;return!!(!(s.label||s.ariaLabel)&&e&&e.inputIds&&((l=e.inputIds)==null?void 0:l.length)<=1)});return h(()=>{u=y([K(s,"id"),o],([l,m])=>{const r=l??(m?void 0:$().value);r!==t.value&&(e?.removeInputId&&(t.value&&e.removeInputId(t.value),!n?.value&&!m&&r&&e.addInputId(r)),t.value=r)},{immediate:!0})}),R(()=>{u&&u(),e?.removeInputId&&t.value&&e.removeInputId(t.value)}),{isLabeledByFormItem:a,inputId:t}},z=s=>{const e=I();return v(()=>{var o,n;return(n=(o=e?.proxy)==null?void 0:o.$props)==null?void 0:n[s]})},g=(s,e={})=>{const o=c(void 0),n=e.prop?o:z("size"),t=e.global?o:S(),u=e.form?{size:void 0}:i(f,void 0),a=e.formItem?{size:void 0}:i(b,void 0);return v(()=>n.value||d(s)||a?.size||u?.size||t.value||"")},L=s=>{const e=z("disabled"),o=i(f,void 0);return v(()=>e.value||d(s)||o?.disabled||!1)},P=({from:s,replacement:e,scope:o,version:n,ref:t,type:u="API"},a)=>{y(()=>d(a),l=>{},{immediate:!0})};export{g as a,E as b,N as c,L as d,$ as e,b as f,D as g,P as u};
