import{_ as b}from"./tslib.es6-CxX45GIN-BGVaTf34.js";import{h as e,F as S}from"./index-DCi8lcS0.js";import{c}from"./clsx-eK3rPvPS-B-dksMZM.js";import{b as q,s as w}from"./reuse-CX4AQDkS-BaVSFETn.js";import{c as I,a as E,K as M,b as $}from"./FormFieldStateWrapper-dDuHhzJa-2UFDj4Vr.js";const W=(o,l)=>{var{class:n}=o,i=b(o,["class"]);return e("div",Object.assign({class:c("kol-field-control__input",n)},i),l)},z=(o,l)=>{const{class:n,id:i,disabled:m,label:t,hideLabel:a,labelAlign:d,renderNoTooltip:_,hint:y,renderNoHint:C,tooltipAlign:F,accessKey:p,shortKey:f,msg:s,touched:h,required:K,readonly:k,fieldControlInputProps:T,fieldControlLabelProps:r,fieldControlTooltipProps:v,fieldControlHintProps:O}=o,B=b(o,["class","id","disabled","label","hideLabel","labelAlign","renderNoTooltip","hint","renderNoHint","tooltipAlign","accessKey","shortKey","msg","touched","required","readonly","fieldControlInputProps","fieldControlLabelProps","fieldControlTooltipProps","fieldControlHintProps"]),P=!C,x=!_,L=I(s,h),g=w(t),N=x&&!g&&a,j=q(p,f),A=typeof s=="string"?"error":s?._type,u=[e(S,null,e(W,Object.assign({},T),l),N&&e(E,Object.assign({},v||{},{id:i,label:t,align:F,badgeText:j}))),e(M,Object.assign({},r||{},{id:i,baseClassName:"kol-field-control",class:c(r?.class,{"kol-field-control__label--visually-hidden":!!a}),hasExpertSlot:g,label:t,accessKey:p,shortKey:f}))];d==="left"&&u.reverse();const H={"kol-field-control--disabled":!!m,"kol-field-control--required":!!K,"kol-field-control--touched":!!h,"kol-field-control--hide-label":!!a,"kol-field-control--read-only":!!k,[`kol-field-control--${A||"error"}`]:!!L,[`kol-field-control--label-align-${d}`]:!!d};return e("div",Object.assign({class:c("kol-field-control",H,n)},B),u,P&&e($,Object.assign({},O||{},{baseClassName:"kol-field-control",id:i,hint:y})))};function D(o){const l={id:o._id,disabled:o._disabled,msg:o._msg,hint:o._hint,label:o._label,hideLabel:o._hideLabel,touched:o._touched};return"_required"in o&&(l.required=o._required),"_readOnly"in o&&(l.readonly=o._readOnly),"_labelAlign"in o&&(l.labelAlign=o._labelAlign),"_accessKey"in o&&(l.accessKey=o._accessKey),"_shortKey"in o&&(l.shortKey=o._shortKey),l}const V=(o,l)=>{var{state:n}=o,i=b(o,["state"]);return e(z,Object.assign({},D(n),i),l)};export{V as F};
//# sourceMappingURL=FieldControlStateWrapper-B6myKFQ--D4hPKTzv.js.map
