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