import type { TPopoverCloseReason } from './types'; /** * Creates a synthetic DOM event from a `TPopoverCloseReason`. * * Useful when bridging the Popover primitive's `onClose({ reason })` callback * to a legacy API that expects a native DOM event - for example, * `@atlaskit/inline-dialog`'s `onClose(event)` contract. * * - `'escape'` → `KeyboardEvent('keydown', { key: 'Escape' })` * - `'light-dismiss'` → `MouseEvent('click')` * * For any other reason, a generic `Event('close')` is returned as a fallback. * * @example * ```tsx * import { createPopoverCloseEvent, type TPopoverCloseReason } from '@atlaskit/top-layer/popover'; * * function onPopoverClose({ reason }: { reason: TPopoverCloseReason }) { * legacyOnClose(createPopoverCloseEvent({ reason })); * } * ``` */ export declare function createPopoverCloseEvent({ reason, }: { reason: TPopoverCloseReason; }): KeyboardEvent | MouseEvent | Event;