"use client"
import{a as m}from"./chunk-NWME2ANF.mjs";import{j as d}from"./chunk-J746XYVQ.mjs";import*as o from"@radix-ui/react-popover";import{Drawer as r}from"vaul";import{jsx as e,jsxs as i}from"react/jsx-runtime";function C({children:t,content:n,align:p="center",side:v="bottom",openPopover:a,setOpenPopover:l,mobileOnly:g,popoverContentClassName:c,collisionBoundary:P,sticky:b,onEscapeKeyDown:s,onWheel:f}){let{isMobile:h}=m();return g||h?i(r.Root,{open:a,onOpenChange:l,children:[e(r.Trigger,{className:"sm:hidden",asChild:!0,children:t}),i(r.Portal,{children:[e(r.Overlay,{className:"fixed inset-0 z-50 bg-gray-100 bg-opacity-10 backdrop-blur"}),i(r.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",onEscapeKeyDown:s,children:[e("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:e("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),e("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white pb-8 align-middle shadow-xl",children:n})]}),e(r.Overlay,{})]})]}):i(o.Root,{open:a,onOpenChange:l,children:[e(o.Trigger,{className:"sm:inline-flex",asChild:!0,children:t}),e(o.Portal,{children:e(o.Content,{sideOffset:8,align:p,side:v,className:d("animate-slide-up-fade z-50 items-center rounded-lg border border-gray-200 bg-white drop-shadow-lg sm:block",c),sticky:b,collisionBoundary:P,onEscapeKeyDown:s,onWheel:f,children:n})})]})}export{C as a};
