import{_ as b}from"./Heading-DT8fK42U-BBz359Il.js";import{h as e,F as S}from"./index-DscFWUNz.js";import{c}from"./clsx-eK3rPvPS-BT_IL7Fz.js";import{b as q,s as w}from"./reuse-CX4AQDkS-Cyh-fyjG.js";import{c as I,a as E,K as M,b as $}from"./FormFieldStateWrapper-B7PqxuTo-B9gPPu8s.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:m,label:a,hideLabel:r,labelAlign:d,renderNoTooltip:_,hint:y,renderNoHint:C,tooltipAlign:F,accessKey:p,shortKey:f,msg:s,touched:h,required:K,readonly:k,fieldControlInputProps:T,fieldControlLabelProps:t,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"]),L=!C,P=!_,x=I(s,h),g=w(a),N=P&&!g&&r,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:a,hideLabel:r,align:F,badgeText:j}))),e(M,Object.assign({},t||{},{id:i,baseClassName:"kol-field-control",class:c(t?.class,{"kol-field-control__label--visually-hidden":!!r}),hasExpertSlot:g,label:a,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":!!r,"kol-field-control--read-only":!!k,[`kol-field-control--${A||"error"}`]:!!x,[`kol-field-control--label-align-${d}`]:!!d};return e("div",Object.assign({class:c("kol-field-control",H,n)},B),u,L&&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-CwL8LaZs-38VTRTM_.js.map
