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