import{_ as c}from"./tslib.es6-CxX45GIN-BGVaTf34.js";import{h as e,F as j}from"./index-B6uGkrgD.js";import{b as S,s as q}from"./component-CPMwSMOM-C0jaO_VE.js";import{b as H,K as I,a as w,i as E,c as M}from"./FormFieldStateWrapper-BZKfIiSI-z8H1tm5r.js";import{c as d}from"./clsx-COFh-Vc8-D7cYsJM5.js";const $=(o,l)=>{var{class:n}=o,i=c(o,["class"]);return e("div",Object.assign({class:d("kol-field-control__input",n)},i),l)},D=(o,l)=>{const{class:n,id:i,disabled:m,label:r,hideLabel:t,labelAlign:a,renderNoTooltip:_,hint:y,renderNoHint:C,tooltipAlign:F,accessKey:b,shortKey:p,msg:f,touched:h,required:K,readonly:k,fieldControlInputProps:T,fieldControlLabelProps:s,fieldControlTooltipProps:O,fieldControlHintProps:B}=o,P=c(o,["class","id","disabled","label","hideLabel","labelAlign","renderNoTooltip","hint","renderNoHint","tooltipAlign","accessKey","shortKey","msg","touched","required","readonly","fieldControlInputProps","fieldControlLabelProps","fieldControlTooltipProps","fieldControlHintProps"]),v=!C,x=!_,g=q(r),A=x&&!g&&t,L=S(b,p),u=[e(j,null,e($,Object.assign({},T),l),A&&e(H,Object.assign({},O||{},{id:i,label:r,align:F,badgeText:L}))),e(I,Object.assign({},s||{},{id:i,baseClassName:"kol-field-control",class:d(s?.class,{"kol-field-control__label--visually-hidden":!!t}),hasExpertSlot:g,label:r,accessKey:b,shortKey:p}))];a==="left"&&u.reverse();const N={"kol-field-control--disabled":!!m,"kol-field-control--required":!!K,"kol-field-control--touched":!!h,"kol-field-control--hide-label":!!t,"kol-field-control--read-only":!!k,[`kol-field-control--${w(f)}`]:!!E(f,h),[`kol-field-control--label-align-${a}`]:!!a};return e("div",Object.assign({class:d("kol-field-control",N,n)},P),u,v&&e(M,Object.assign({},B||{},{baseClassName:"kol-field-control",id:i,hint:y})))};function W(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 U=(o,l)=>{var{state:n}=o,i=c(o,["state"]);return e(D,Object.assign({},W(n),i),l)};export{U as F};
//# sourceMappingURL=FieldControlStateWrapper-DrDyeOtu-BLF0o98M.js.map
