import{dq as a,dG as u,dm as s}from"./index-DjbVAZHL.js";import{S as h}from"./SelectField-XDAy-a1R.js";const f=a.memo(({value:o,values:t,disabled:c,onChange:d,label:l,...p})=>{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:l,value:o??"",onChange:e=>d(e.target.value),title:r?i(e=>e.the_only_endpoint):`${o}`,disabled:o&&r||c,className:"select validator w-32",...p,children:[s.jsx("option",{value:"",disabled:!0,children:i(e=>e.select_endpoint)}),m]})});export{f as E};
