{
  "version": 3,
  "sources": ["../../../../../src/lib/ui/components/primitives/Popover.tsx"],
  "sourcesContent": ["import { useContainer } from '@bigbluebutton/editor'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\nimport React, { FC } from 'react'\nimport { useMenuIsOpen } from '../../hooks/useMenuIsOpen'\n\ntype PopoverProps = {\n\tid: string\n\topen?: boolean\n\tchildren: React.ReactNode\n\tonOpenChange?: (isOpen: boolean) => void\n}\n\nexport const Popover: FC<PopoverProps> = ({ id, children, onOpenChange, open }) => {\n\tconst [isOpen, handleOpenChange] = useMenuIsOpen(id, onOpenChange)\n\n\treturn (\n\t\t<PopoverPrimitive.Root\n\t\t\tonOpenChange={handleOpenChange}\n\t\t\topen={open || isOpen /* allow debugging */}\n\t\t>\n\t\t\t<div className=\"tlui-popover\">{children}</div>\n\t\t</PopoverPrimitive.Root>\n\t)\n}\n\nexport const PopoverTrigger: FC<{\n\tchildren: React.ReactNode\n\tdisabled?: boolean\n\tclassName?: string\n\t'data-testid'?: string\n}> = ({ children, disabled, 'data-testid': testId }) => {\n\treturn (\n\t\t<PopoverPrimitive.Trigger data-testid={testId} disabled={disabled} asChild dir=\"ltr\">\n\t\t\t{children}\n\t\t</PopoverPrimitive.Trigger>\n\t)\n}\nexport const PopoverContent: FC<{\n\tchildren: React.ReactNode\n\tside: 'top' | 'bottom' | 'left' | 'right'\n\talign?: 'start' | 'center' | 'end'\n\talignOffset?: number\n\tsideOffset?: number\n}> = ({ side, children, align = 'center', sideOffset = 8, alignOffset = 0 }) => {\n\tconst container = useContainer()\n\treturn (\n\t\t<PopoverPrimitive.Portal container={container}>\n\t\t\t<PopoverPrimitive.Content\n\t\t\t\tclassName=\"tlui-popover__content\"\n\t\t\t\tside={side}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\talign={align}\n\t\t\t\talignOffset={alignOffset}\n\t\t\t\tdir=\"ltr\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t{/* <StyledArrow /> */}\n\t\t\t</PopoverPrimitive.Content>\n\t\t</PopoverPrimitive.Portal>\n\t)\n}\n"],
  "mappings": "AAoBG;AApBH,SAAS,oBAAoB;AAC7B,YAAY,sBAAsB;AAElC,SAAS,qBAAqB;AASvB,MAAM,UAA4B,CAAC,EAAE,IAAI,UAAU,cAAc,KAAK,MAAM;AAClF,QAAM,CAAC,QAAQ,gBAAgB,IAAI,cAAc,IAAI,YAAY;AAEjE,SACC;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACA,cAAc;AAAA,MACd,MAAM,QAAQ;AAAA,MAEd,8BAAC,SAAI,WAAU,gBAAgB,UAAS;AAAA;AAAA,EACzC;AAEF;AAEO,MAAM,iBAKR,CAAC,EAAE,UAAU,UAAU,eAAe,OAAO,MAAM;AACvD,SACC,oBAAC,iBAAiB,SAAjB,EAAyB,eAAa,QAAQ,UAAoB,SAAO,MAAC,KAAI,OAC7E,UACF;AAEF;AACO,MAAM,iBAMR,CAAC,EAAE,MAAM,UAAU,QAAQ,UAAU,aAAa,GAAG,cAAc,EAAE,MAAM;AAC/E,QAAM,YAAY,aAAa;AAC/B,SACC,oBAAC,iBAAiB,QAAjB,EAAwB,WACxB;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACA,WAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,KAAI;AAAA,MAEH;AAAA;AAAA,EAEF,GACD;AAEF;",
  "names": []
}
