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