import{ChevronDownIcon as x}from"@chakra-ui/icons";import{Box as a,Button as g,Flex as u,Popover as c,PopoverBody as P,PopoverContent as d,PopoverTrigger as s,Text as l}from"@chakra-ui/react";import"react";import{jsx as o,jsxs as n}from"react/jsx-runtime";var w=({options:i,onChange:p,defaultValue:t,isOpen:v,onOpen:m,onClose:r})=>n(c,{isOpen:v,onClose:r,isLazy:!0,children:[o(s,{children:o(g,{fontWeight:"semibold",textAlign:"left",overflow:"hidden",w:"full",size:"sm",rightIcon:o(x,{}),variant:"outline",onClick:m,children:o(l,{textAlign:"left",w:"full",children:t?.label})})}),o(d,{p:"0",minW:"40",w:"fit-content",maxH:"72",overflowY:"auto",children:o(P,{p:"0",children:i.map((e,f)=>n(u,{onClick:()=>{p(e),r()},bg:e?.value===t?.value?"muted":"initial",p:"1.5",cursor:"pointer",_hover:{bg:"muted"},children:[o(a,{children:e?.icon}),o(l,{fontSize:"14px",ml:1,children:e.label})]},f))})})]}),T=w;export{T as default};
