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