import{r as x,j as o,Q as f}from"./main-D6SjkSWq.js";import{u as h}from"./use-normalized-models-D9FqQyBj.js";import{F as j}from"./form-chip-field-CRtNtvyR.js";function z({name:a,label:m,placeholder:t,model:l,endpoint:r,className:n,allowCustomValue:u=!1,size:c,valueKey:d}){const[i,p]=x.useState(""),{data:e,isLoading:g}=h(r||`normalized-models/${l}`,{query:i});return o.jsx(j,{className:n,name:a,label:m,size:c,valueKey:d,inputValue:i,onInputValueChange:p,suggestions:e==null?void 0:e.results,placeholder:t,isLoading:g,allowCustomValue:u,children:e==null?void 0:e.results.map(s=>o.jsx(f,{value:s,startIcon:s.image?o.jsx("img",{className:"h-24 w-24 rounded-full object-cover",src:s.image,alt:""}):void 0,children:s.name},s.id))})}export{z as F};
