var x=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var w=(n,e)=>{for(var t in e)x(n,t,{get:e[t],enumerable:!0})},B=(n,e,t,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of P(e))!s.call(n,i)&&i!==t&&x(n,i,{get:()=>e[i],enumerable:!(m=p(e,i))||m.enumerable});return n};var b=n=>B(x({},"__esModule",{value:!0}),n);var T={};w(T,{default:()=>C});module.exports=b(T);var c=require("@chakra-ui/icons"),o=require("@chakra-ui/react"),y=require("react"),r=require("react/jsx-runtime"),h=({options:n,onChange:e,defaultValue:t,isOpen:m,onOpen:i,onClose:g})=>(0,r.jsxs)(o.Popover,{isOpen:m,onClose:g,isLazy:!0,children:[(0,r.jsx)(o.PopoverTrigger,{children:(0,r.jsx)(o.Button,{fontWeight:"semibold",textAlign:"left",overflow:"hidden",w:"full",size:"sm",rightIcon:(0,r.jsx)(c.ChevronDownIcon,{}),variant:"outline",onClick:i,children:(0,r.jsx)(o.Text,{textAlign:"left",w:"full",children:t==null?void 0:t.label})})}),(0,r.jsx)(o.PopoverContent,{p:"0",minW:"40",w:"fit-content",maxH:"72",overflowY:"auto",children:(0,r.jsx)(o.PopoverBody,{p:"0",children:n.map((v,l)=>(0,r.jsxs)(o.Flex,{onClick:()=>{e(v),g()},bg:(v==null?void 0:v.value)===(t==null?void 0:t.value)?"muted":"initial",p:"1.5",cursor:"pointer",_hover:{bg:"muted"},children:[(0,r.jsx)(o.Box,{children:v==null?void 0:v.icon}),(0,r.jsx)(o.Text,{fontSize:"14px",ml:1,children:v.label})]},l))})})]}),C=h;
