import{j as e,n as a,c as s,o as t,p as r,q as n,I as l,r as i}from"./vendor-react-Co0R0q1H.js";import{aa as o,A as c,m as d,bn as u,q as m}from"./index-nE6cslhy.js";function x({value:l,onChange:i,className:m,placeholder:x,disabled:p,"aria-label":b,children:h}){return e.jsx(a,{value:l,onChange:i,disabled:p,children:({open:a})=>e.jsxs("div",{className:s("relative",m),children:[e.jsxs(t,{"aria-label":b,className:s(["relative flex w-full items-center justify-between gap-2","radius-inner px-3 py-2","text-left text-sm text-fg-primary","bg-input-bg border border-input-border","ring-focus-inset","hover:border-edge-strong","disabled:opacity-40 disabled:pointer-events-none disabled:cursor-not-allowed","transition-colors"]),children:[e.jsx(r,{as:"span",options:h,placeholder:x&&e.jsx("span",{className:"text-fg-muted",children:x}),className:"block truncate"}),e.jsx(o,{className:s("w-4 h-4 text-fg-muted transition-transform duration-200",a&&"rotate-180")})]}),e.jsx(c,{children:a&&e.jsx(d.div,{initial:{opacity:0,y:-4,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-4,scale:.98},transition:u.dropdown,className:"absolute z-50 mt-1",children:e.jsx(n,{static:!0,anchor:"bottom start",className:s(["w-[var(--button-width)] min-w-[180px]","max-h-60 overflow-y-auto overscroll-contain scroll-py-1","radius-inset p-1","surface-elevated","focus:outline-none"]),children:h})})})]})})}function p({value:a,disabled:t,className:r,children:n}){return e.jsx(l,{as:i.Fragment,value:a,disabled:t,children:({selected:a,focus:l})=>e.jsxs("div",{className:s("flex items-center gap-2 px-3 py-2 radius-control cursor-default","text-sm",l&&"bg-sys-blue text-white",!l&&"text-fg-primary",a&&!l&&"text-sys-blue",t&&"opacity-50 cursor-not-allowed",r),children:[e.jsx("span",{className:"w-4 flex-shrink-0",children:a&&e.jsx(m,{className:"w-4 h-4"})}),e.jsx("span",{className:"truncate",children:n})]})})}function b({className:a,...t}){return e.jsx("span",{...t,className:s("truncate",a)})}export{x as L,p as a,b};
