import{_ as b}from"./Heading-D_vnx163-UWSZHCcZ.js";import{h as e,x as H,F as S,y as q}from"./index-yJ8X--q8.js";import{c}from"./clsx-eK3rPvPS-BT_IL7Fz.js";import{c as I,a as w,b as M,K as E,d as $}from"./getRenderStates-B4Xg8PG8-CdOczHfm.js";/*!
 * KoliBri - The accessible HTML-Standard
 */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:_,label:t,hideLabel:s,labelAlign:d,renderNoTooltip:m,hint:y,renderNoHint:C,tooltipAlign:F,accessKey:h,shortKey:p,msg:r,touched:f,required:K,readonly:k,fieldControlInputProps:v,fieldControlLabelProps:a,fieldControlTooltipProps:T,fieldControlHintProps:O}=o,x=b(o,["class","id","disabled","label","hideLabel","labelAlign","renderNoTooltip","hint","renderNoHint","tooltipAlign","accessKey","shortKey","msg","touched","required","readonly","fieldControlInputProps","fieldControlLabelProps","fieldControlTooltipProps","fieldControlHintProps"]),B=!C,L=!m,P=w(r,f),g=q(t),N=L&&!g&&s,j=H(h,p),u=[e(S,null,e(W,Object.assign({},v),l),N&&e(M,Object.assign({},T||{},{id:i,label:t,hideLabel:s,align:F,badgeText:j}))),e(E,Object.assign({},a||{},{id:i,baseClassName:"kol-field-control",class:c(a==null?void 0:a.class,{"kol-field-control__label--visually-hidden":!!s}),hasExpertSlot:g,label:t,accessKey:h,shortKey:p}))];d==="left"&&u.reverse();const A={"kol-field-control--disabled":!!_,"kol-field-control--required":!!K,"kol-field-control--touched":!!f,"kol-field-control--hide-label":!!s,"kol-field-control--read-only":!!k,[`kol-field-control--${(r==null?void 0:r.type)||"error"}`]:!!P,[`kol-field-control--label-align-${d}`]:!!d};return e("div",Object.assign({class:c("kol-field-control",A,n)},x),u,B&&e($,Object.assign({},O||{},{baseClassName:"kol-field-control",id:i,hint:y})))};function D(o){const l={id:o._id,disabled:o._disabled,msg:I(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 U=(o,l)=>{var{state:n}=o,i=b(o,["state"]);return e(z,Object.assign({},D(n),i),l)};export{U as F};
//# sourceMappingURL=FieldControlStateWrapper-DC7YlV6o-foHzOYZl.js.map
