import{r as a,u,j as s}from"./index-KAtljJVt.js";import{S as h}from"./SelectField-wRS87yKs.js";const E=a.memo(({value:o,values:t,disabled:c,onChange:l,label:p,...d})=>{const{t:i}=u("common"),r=t.size===1,m=a.useMemo(()=>{const e=[];for(const n of t)e.push(s.jsx("option",{value:n,children:n},n));return e},[t]);return s.jsxs(h,{name:"endpoint_picker",label:p,value:o??"",onChange:e=>l(e.target.value),title:r?i(e=>e.the_only_endpoint):`${o}`,disabled:o&&r||c,className:"select validator w-32",...d,children:[s.jsx("option",{value:"",disabled:!0,children:i(e=>e.select_endpoint)}),m]})});export{E};
