System.register(["./index-legacy-DF2p3puw.js"],(function(e,t){"use strict";var n,r,c;return{setters:[function(e){n=e.r,r=e.j,c=e.N}],execute:function(){e("I",(function(e){var t=e.id,a=e.title,i=e.className,o=e.onChange,u=e.options,l=e.value,s=n.useRef(null),d=n.useCallback((function(){var e;if(s.current){var t=document.createElement("select");t.className=i||"";var n=document.createElement("option");n.textContent=(null===(e=s.current.querySelector("option:checked"))||void 0===e?void 0:e.textContent)||"",t.append(n),document.body.append(t);var r=t.getBoundingClientRect().width;t.remove(),s.current.style.width="calc(".concat(r,"px - 10px - 0.2rem)")}}),[i]),m=n.useCallback((function(e){return d(),o(e.target.value)}),[o,d]);return n.useEffect((function(){d()}),[d,u]),r.jsx("select",{title:a,id:t,ref:s,onChange:m,value:l,className:c("inline-block border-0 ring-0 focus:ring-0 bg-transparent","text-theme-highlight text-sm font-medium p-0 m-0 cursor-pointer",i),children:u.map((function(e){var t=e.value,n=e.label;return r.jsx("option",{value:t,children:n},t)}))})}))}}}));
