import{r,j as s,b8 as f}from"./index-Db-xuq0b.js";import{P as d}from"./Popover-CzANYrEa.js";const x=r.createContext({open:!1,setOpen:()=>{}});function P({children:o,open:t,onOpenChange:e,defaultOpen:i=!1}){const[n,u]=r.useState(i),a=t!==void 0,p=a?t:n,l=r.useCallback(c=>{a||u(c),e==null||e(c)},[a,e]);return s.jsx(x.Provider,{value:{open:p,setOpen:l},children:s.jsx(d,{opened:p,onChange:l,withinPortal:!0,shadow:"md",radius:"md",children:o})})}function j({children:o,asChild:t}){return s.jsx(d.Target,{children:t&&r.isValidElement(o)?o:s.jsx("span",{style:{display:"contents"},children:o})})}function b({children:o,className:t,align:e,sideOffset:i,...n}){return s.jsx(d.Dropdown,{className:f("bg-popover text-popover-foreground z-50 w-72 rounded-md border p-4 shadow-md",t),...n,children:o})}export{P,j as a,b};
