import { type ComponentProps, type CSSProperties, type KeyboardEventHandler, type ReactNode, type SyntheticEvent, type FocusEventHandler } from 'react'; type Side = 'top' | 'right' | 'bottom' | 'left'; type Alignment = 'start' | 'end'; /** * Placement options for the popover relative to the trigger element. * Follows the same pattern as Floating UI but with our own type definition. */ export type PopoverPlacement = Side | `${Side}-${Alignment}`; /** * Options to control the behavior of the Popover, which be used to render the Trigger and the Popover Content */ export type PopoverRenderOptions = { /** * If the Popover is opening, close it * If the Popover is closed, open it */ togglePopover: (event?: SyntheticEvent) => void; /** * Open the Popover */ openPopover: (event?: SyntheticEvent) => void; /** * Close the Popover */ closePopover: (event?: SyntheticEvent) => void; /** * Current state of the Popover */ isPopoverOpen: boolean; /** * This is required parameter to make the Trigger and the Popover automatically align with each other. * * @param element - The trigger element, must be an HTMLElement like button or div. * * @example * ```tsx * { * return