import{r as D,j as a,aF as _,bs as m}from"./index-CK33qGU_.js";const u={key:"DUMMY",label:"DUMMY"},F=({name:o,control:n,options:t,disabled:E,placeholder:M,required:c,isLoading:r=!1,defaultValue:f="",onSelectionChange:l,...i})=>{const p=s=>e=>{Array.isArray(e)||(s(e.key),l&&l(e.key))},x=D.useMemo(()=>r?[u]:t,[r,t]);return a.jsx(_,{name:o,control:n,rules:{required:c},defaultValue:f,render:({field:{value:s,onChange:e}})=>a.jsx(m,{...i,isMulti:!1,disabled:r||E,placeholder:r?"Loading...":M,onChange:p(e),options:x,value:s})})};export{F};
