import type { AfterGuiAttachedParams } from './iAfterGuiAttachedParams'; /** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */ export type AddPopupParams = LabelAddPopupParams | OwnsAddPopupParams; interface BaseAddPopupParams { modal?: boolean; eChild: HTMLElement; closeOnEsc?: boolean; closedCallback?: (e?: MouseEvent | TouchEvent | KeyboardEvent) => void; click?: MouseEvent | Touch | null; alwaysOnTop?: boolean; afterGuiAttached?: (params: AfterGuiAttachedParams) => void; positionCallback?: () => void; anchorToElement?: HTMLElement; } interface LabelAddPopupParams extends BaseAddPopupParams { ariaLabel: string; ariaOwns?: never; } interface OwnsAddPopupParams extends BaseAddPopupParams { ariaLabel?: never; ariaOwns: HTMLElement; } export interface PopupEventParams { originalMouseEvent?: MouseEvent | Touch | null; mouseEvent?: MouseEvent; touchEvent?: TouchEvent; keyboardEvent?: KeyboardEvent; forceHide?: boolean; } /** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */ export interface AddPopupResult { hideFunc: (params?: PopupEventParams) => void; } interface BasePopupPositionParams { ePopup: HTMLElement; additionalParams?: TParams; } export interface AgPopupPositionParams extends BasePopupPositionParams { nudgeX?: number; nudgeY?: number; position?: 'over' | 'under'; alignSide?: 'left' | 'right'; keepWithinBounds?: boolean; skipObserver?: boolean; updatePosition?: () => { x: number; y: number; }; postProcessCallback?: () => void; } export interface AgComponentPopupPositionParams extends AgPopupPositionParams { type: string; eventSource: HTMLElement; } export interface AgMousePopupPositionParams extends AgPopupPositionParams { type: string; mouseEvent: MouseEvent | Touch; } export interface AgMenuPopupPositionParams extends BasePopupPositionParams { eventSource: HTMLElement; event?: MouseEvent | KeyboardEvent; } export {};