import { OffsetOptions } from '@floating-ui/dom';
import { CSSResult, PropertyValues } from 'lit';
import { Component } from '../../models';
import { DepthManager, StackChange, StackedOverlayComponent } from '../../utils/controllers/DepthManager';
import { PopoverBoundaryRoot, PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger } from './popover.types';
declare const Popover_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyDownHandledMixin").KeyDownHandledMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyToActionMixin").KeyToActionInterface> & import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/BackdropMixin").BackdropMixinInterface> & import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/PreventScrollMixin").PreventScrollMixinInterface> & import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/focus/FocusTrapMixin").FocusTrapClassInterface> & typeof Component;
/**
 * Popover is generic overlay which can be triggered by any actionable element.
 *
 * It can be used for tooltips, dropdowns, menus or any showing any other contextual content.
 *
 * The popover automatically positions itself based on available space and
 * supports dynamic height adjustments with scrollable content when needed.
 * It uses [Floating UI](https://floating-ui.com/) for maintaining the position of the popover.
 *
 * ## Limitations
 *
 * ### On trigger for multiple popovers
 *
 * A component (button, etc.) can trigger more than one popover, but only one of them should change the
 * aria-expanded and aria-haspopup attributes on the trigger.
 *
 * To prevent unexpected attribute changes on the trigger `disable-aria-expanded` attribute must be set on all linked
 * Popovers except one.
 *
 * ### React Popover with append-to attribute
 *
 * React mounts the popover based on the virtual DOM, but when the append-to attribute is set, the popover removes itself
 * and mounts to the specified element. React will not know about the move and will not know about the
 * newly created mdc-popoverportal element either. This throws a `NotFoundError` error when the Popover is directly
 * added/removed by React, for example:
 *
 * ```tsx
 * const SomeComponent = () => {
 *    const [isOpen, setIsOpen] = useState(false);
 *    return (<div>
 *      {isOpen && <Popover append-to="some-element-id">...</mdc-popover>}
 *    </div>);
 * }
 * ```
 * As a workaround Popover need to wrap with any other element/component, for example:
 * ```tsx
 * const SomeComponent = () => {
 *    const [isOpen, setIsOpen] = useState(false);
 *    return (<div>
 *      {isOpen && <div>
 *        <Popover append-to="some-element-id">...</mdc-popover>
 *      <div>}
 *    </div>);
 * }
 * ```
 * Note the wrapper <div> around the Popover component (React.Fragment does not work).
 *
 * @dependency mdc-button
 *
 * @tagname mdc-popover
 *
 * @event shown - (React: onShown) This event is dispatched when the popover is shown
 * @event hidden - (React: onHidden) This event is dispatched when the popover is hidden
 * @event created - (React: onCreated) This event is dispatched when the popover is created (added to the DOM)
 * @event destroyed - (React: onDestroyed) This event is dispatched when the popover is destroyed (removed from the DOM)
 *
 * @cssproperty --mdc-popover-arrow-border-radius - radius of the arrow border
 * @cssproperty --mdc-popover-arrow-border - border of the arrow
 * @cssproperty --mdc-popover-primary-background-color - primary background color of the popover
 * @cssproperty --mdc-popover-border-color - border color of the popover
 * @cssproperty --mdc-popover-inverted-background-color - inverted background color of the popover
 * @cssproperty --mdc-popover-inverted-border-color - inverted border color of the popover
 * @cssproperty --mdc-popover-inverted-text-color - inverted text color of the popover
 * @cssproperty --mdc-popover-elevation-3 - elevation of the popover
 * @cssproperty --mdc-popover-max-width - max width of the popover
 * @cssproperty --mdc-popover-max-height - max height of the popover
 * @cssproperty --mdc-popover-width - width of the popover
 * @cssproperty --mdc-popover-backdrop-color - background color of the backdrop (if backdrop is enabled)
 *
 * @slot - Default slot for the popover content
 *
 * @csspart popover-close - The close button of the popover.
 * @csspart popover-content - The content of the popover.
 * @csspart popover-hover-bridge - The hover bridge of the popover.
 */
declare class Popover extends Popover_base implements StackedOverlayComponent {
    /** track the depth of the popover for z-index calculation
     * @internal
     */
    protected depthManager: DepthManager;
    /**
     * The unique ID of the popover.
     */
    id: string;
    /**
     * The ID of the element that triggers the popover.
     * This attribute is required for the popover to work.
     */
    triggerID: string;
    /**
     * Determines the events that cause the Popover to show.
     * Multiple event names should be separated by spaces.
     * For example to allow both click and hover, use 'click mouseenter' as the trigger.
     * - **click**
     * - **mouseenter**
     * - **focusin**
     * - **manual**
     *
     * @default click
     */
    trigger: PopoverTrigger;
    /**
     * The placement of the popover.
     * - **top**
     * - **top-start**
     * - **top-end**
     * - **bottom**
     * - **bottom-start**
     * - **bottom-end**
     * - **left**
     * - **left-start**
     * - **left-end**
     * - **right**
     * - **right-start**
     * - **right-end**
     * @default bottom
     */
    placement: PopoverPlacement;
    /**
     * Color of the popover
     * - **tonal**
     * - **contrast**
     * @default tonal
     */
    color: PopoverColor;
    /**
     * The visibility of the popover.
     * @default false
     */
    visible: boolean;
    /**
     * The offset of the popover.
     *
     * By default, offset is just a number which represents the distance on the main axis in pixels
     * between the reference element and the popover. Main axis is determined by the placement of the popover.
     * For example, if the placement is top or bottom, the main axis is vertical, and
     * if the placement is left or right, the main axis is horizontal.
     *
     * Alternatively the offset property accepts other values as well:
     * - with an object value, `crossAxis` and `alignmentAxis` can be changed as well
     * - with a function value, it provides the opportunity to fully control the offset logic
     *
     * Note: only the number value reflected in the `offset` attribute
     *
     * @default 4
     * @see [Floating UI - offset](https://floating-ui.com/docs/offset)
     */
    offset: OffsetOptions;
    /**
     * This describes the clipping element(s) or area that overflow will be checked relative to.
     * The default is 'clippingAncestors', which are the overflow ancestors which will cause the
     * element to be clipped.
     *
     * Possible values:
     *  - 'clippingAncestors'
     *  - any css selector
     *
     * @default 'clippingAncestors'
     *
     * @see [Floating UI - boundary](https://floating-ui.com/docs/detectOverflow#boundary)
     */
    boundary: 'clippingAncestors' | string;
    /**
     * This describes the root boundary that the element will be checked for overflow relative to.
     * The default is 'viewport', which is the area of the page the user can see on the screen.
     *
     * The other string option is 'document', which is the entire page outside the viewport.
     *
     * @default 'viewport'
     *
     * @see [Floating UI - rootBoundary](https://floating-ui.com/docs/detectOverflow#rootboundary)
     */
    boundaryRoot: PopoverBoundaryRoot;
    /**
     * Virtual padding around the boundary to check for overflow.
     * So the popover will not be placed on top of the edge of the boundary.
     *
     * Default works well for most cases, but you can set this to customise it when necessary.
     *
     * @default undefined
     *
     * @see [Floating UI - padding](https://floating-ui.com/docs/detectOverflow#padding)
     */
    boundaryPadding?: number;
    /**
     * Determines whether the focus trap is enabled.
     * If true, focus will be restricted to the content within this component.
     * @default false
     */
    focusTrap: boolean;
    /**
     * Prevent outside scrolling when popover is shown.
     * @default false
     */
    preventScroll: boolean;
    /**
     * The arrow visibility of the popover.
     * @default false
     */
    showArrow: boolean;
    /**
     * The close button visibility of the popover.
     * @default false
     */
    closeButton: boolean;
    /**
     * Determines whether the popover is interactive.
     * Make sure to set focusTrap to true to keep the focus inside the popover in case necessary.
     * Setting interactive to true will not automatically set focusTrap!
     *
     * @default false
     */
    interactive: boolean;
    /**
     * The delay of the show/hide popover.
     * @default 0,0
     */
    delay: string;
    /**
     * Hide popover on escape key press.
     * @default false
     */
    hideOnEscape: boolean;
    /**
     * Propagates the event, when the escape key is pressed (only when pressed inside the popover)
     * If true, the escape key press close the popover and will propagate the keydown event.
     * If false, the escape key press will close the popover but will not propagate the keydown event.
     * (set to false to prevent the event from bubbling up to the document).
     *
     * This only works when `hideOnEscape` is true.
     *
     * @default false
     */
    propagateEventOnEscape: boolean;
    /**
     * Hide popover on blur.
     * @default false
     */
    hideOnBlur: boolean;
    /**
     * Hide on outside click of the popover.
     * @default false
     */
    hideOnOutsideClick: boolean;
    /**
     * The focus back to trigger after the popover hide.
     * @default false
     */
    focusBackToTrigger: boolean;
    /**
     * Determines whether the popover with backdrop.
     * Other than popover and trigger element, the rest of the screen will be covered with a backdrop.
     * @default false
     */
    backdrop: boolean;
    /**
     * Element ID the backdrop will be a append to (if `backdrop` is true).
     * @default ''
     */
    backdropAppendTo?: string;
    /**
     * Set this property to false to make the backdrop a dimmed visible backdrop (if `backdrop` is true).
     * This is useful for cases where the popovers backdrop should get dimmed.
     *
     * @default true - default is to have a invisible backdrop
     */
    isBackdropInvisible?: boolean;
    /**
     * Changes the placement of popover to keep it in view when scrolling.
     * @default false
     */
    disableFlip: boolean;
    /**
     * Changes the size of popover to keep it in view when scrolling.
     * @default false
     */
    size: boolean;
    /**
     * The internal z-index of the popovere.
     * @internal
     */
    private internalZIndex?;
    /**
     * The effective z-index of the popover.
     *
     * If no explicit `z-index` value is provided, then it automatically calculated
     * to ensure proper stacking order among multiple overlays.
     */
    get zIndex(): number;
    set zIndex(value: number);
    /**
     * Element ID that the popover append to.
     * @default ''
     */
    appendTo?: string;
    /**
     * aria-label attribute to be set for close button accessibility.
     * @default null
     */
    closeButtonAriaLabel: string | null;
    /**
     * The strategy of the popover.
     * This determines how the popover is positioned in the DOM.
     * - **absolute**: The popover is positioned absolutely relative to the nearest positioned ancestor.
     * - **fixed**: The popover is positioned fixed relative to the viewport.
     *
     * Default as `absolute` is recommended for most cases.
     * In cases where the popover gets clipped by a scrollable container,
     * you can set this to `fixed` to avoid clipping.
     *
     * @default absolute
     * @see [Floating UI - strategy](https://floating-ui.com/docs/computePosition#strategy)
     */
    strategy: PopoverStrategy;
    /**
     * Role of the popover
     * @default dialog
     */
    role: HTMLElement['role'];
    /**
     * aria-labelledby for an interactive popover only, defaults to the trigger component id.
     * Used in nested cases where the triggerComponent isn't the actual button.
     */
    ariaLabelledby: string | null;
    /**
     * aria-describedby of the popover.
     */
    ariaDescribedby: string | null;
    /**
     * Disable setting the `aria-expanded` attribute on trigger element.
     *
     * Note, when `disable-aria-expanded` is true
     *  - when its value change after first update to
     *    - `true`: popover will not remove the `aria-expanded` to avoid conflicts when there are more than one popover
     *      registered to the same trigger
     *      - `false`: check `aria-expanded` value and update it if necessary.
     *  - aria-haspopup will be disabled as well
     * @default false
     */
    disableAriaExpanded: boolean;
    /**
     * Controls the visibility of a connected tooltip when this popover is open.
     * - If set to `true`, the tooltip remains open alongside the popover.
     * - If set to `false`, the tooltip will be closed when the popover opens.
     * Useful for scenarios where both a popover and a tooltip are linked to the same trigger element.
     */
    keepConnectedTooltipOpen: boolean;
    /**
     * Whether to update the position of the Popover on every animation frame if required.
     * While optimized for performance, it should be used sparingly and with caution.
     *
     * @default false
     */
    animationFrame: boolean;
    /**
     * Improves positioning for inline reference elements that span over multiple lines,
     * such as hyperlinks or range selections.
     *
     * When enabled, the floating-ui `inline` middleware is used to position the popover
     * based on the individual client rects of the inline element, rather than its full bounding box.
     *
     * @default false
     * @see [Floating UI - inline](https://floating-ui.com/docs/inline)
     */
    inline: boolean;
    /**
     * The index of the interactive element to receive focus when the popover opens with focus trap enabled.
     * The index is based on the order of interactive elements in the popover, starting from 0.
     * If not set, the first interactive element (index 0) will receive focus by default.
     * This is useful for cases where you want a specific element to receive focus when the popover opens, instead of the default first element.
     * @default null
     */
    elementIndexToReceiveFocus: number | null;
    /**
     * The name of the stack group this popover belongs to.
     * Popovers with the same stack group name will be grouped together.
     */
    stackGroupName: string;
    /** @internal */
    arrowElement: HTMLElement | null;
    /** @internal */
    private isHovered;
    /** @internal */
    private openDelay;
    /** @internal */
    protected closeDelay: number;
    /** @internal */
    private utils;
    /** @internal */
    private floatingUICleanupFunction;
    /** @internal */
    protected shouldSuppressOpening: boolean;
    /** @internal */
    private get connectedTooltip();
    /**
     * Get trigger element on-demand
     * It is necessary because trigger might appear later in the DOM, or it could be replaced completely.
     */
    get triggerElement(): HTMLElement | null;
    /** @internal */
    private timers;
    constructor();
    /** @internal */
    private parseTrigger;
    protected firstUpdated(changedProperties: PropertyValues): Promise<void>;
    connectedCallback(): void;
    disconnectedCallback(): Promise<void>;
    /**
     * Sets up the trigger related event listeners, based on the trigger type.
     * Includes fallback for mouseenter trigger to also handle focusin for non-interactive popovers.
     *
     * We use capture phase on `document` for all trigger listeners to make sure we capture trigger
     * events even when they are not propagated during the bubble phase (e.g.: buttons in list item).
     *
     * Hover is detected via `mouseover`/`mouseout` (not `mouseenter`/`mouseleave`). The latter are
     * spec'd as `composed: false` and do not bubble, so a document-level listener never sees them
     * when the trigger lives inside a shadow root (e.g. wrapped in `mdc-iconprovider` or
     * `mdc-themeprovider`). `mouseover`/`mouseout` are `composed: true` and bubble, so they cross
     * shadow boundaries and reach `document`, letting us keep event delegation (no direct reference
     * to the trigger element and no dependency on its mount/unmount lifecycle). The handlers filter
     * out movements that stay within the trigger's subtree, recreating enter/leave semantics.
     * @internal
     */
    private setupTriggerListeners;
    /**
     * Removes the trigger related event listeners.
     * @internal
     */
    private removeTriggerListeners;
    /**
     * Removes all event listeners related to the popover.
     * @internal
     */
    private removeAllListeners;
    protected updated(changedProperties: PropertyValues): Promise<void>;
    /**
     * Handles the outside click event to close the popover.
     *
     * @param event - The mouse event.
     * @internal
     */
    protected onOutsidePopoverClick: (event: MouseEvent) => void;
    /**
     * Handles the escape keydown event to close the popover.
     *
     * This method is attached to the document.
     *
     * @param event - The keyboard event.
     * @internal
     */
    private onEscapeKeydown;
    /**
     * Handles the popover focus out event.
     *
     * @param event - The focus event.
     * @internal
     */
    private onPopoverFocusOut;
    /** @internal */
    onComponentStackChanged(changed: StackChange): void;
    /**
     * Handles the popover visibility change and position the popover.
     * Handles the exit event to close the popover.
     *
     * @param oldValue - The old value of the visible property.
     * @param newValue - The new value of the visible property.
     */
    protected isOpenUpdated(oldValue: boolean, newValue: boolean): Promise<void>;
    /**
     * Determines whether a delegated `mouseover`/`mouseout` event is movement that stays within the
     * trigger's subtree rather than a genuine enter/leave of the trigger.
     *
     * Both events fire repeatedly while the pointer moves between elements inside the trigger
     * (e.g. an icon with internal SVG elements). `relatedTarget` is the element on the other side of
     * the boundary (the element being left for `mouseover`, or entered for `mouseout`); if it
     * resolves to the trigger or one of its shadow hosts, the pointer has not crossed the trigger
     * boundary and the event should be ignored.
     * @internal
     */
    private isHoverWithinTrigger;
    /**
     * Handles the pointer moving over the trigger element (delegated `mouseover`).
     * This method sets the `isHovered` flag to true and shows the popover.
     * @internal
     */
    private handleMouseEnter;
    /**
     * Handles the pointer leaving the trigger element (delegated `mouseout`).
     * This method sets the `isHovered` flag to false and starts the close delay
     * timer to hide the popover.
     * @internal
     */
    private handleMouseLeave;
    /**
     * Closes based on hideOnBlur property or hover state.
     * @internal
     */
    private handleFocusOut;
    /**
     * Handles focus in event on the trigger element.
     * This method checks if the trigger element has visible focus or is being hovered.
     * @internal
     */
    private handleFocusIn;
    /**
     * Cancels the open delay timer.
     * @internal
     */
    private cancelOpenDelay;
    /**
     * Starts the close delay timer.
     * If the popover is not interactive, it will close the popover after the delay.
     * @internal
     */
    private startCloseDelay;
    /**
     * Cancels the close delay timer.
     * @internal
     */
    private cancelCloseDelay;
    /**
     * Shows the popover.
     */
    show(): void;
    /**
     * Hides the popover.
     */
    hide: () => void;
    /**
     * Toggles the popover visibility.
     */
    togglePopoverVisible: (event: Event) => void;
    /**
     * Positions the popover based on the trigger element.
     * It also handles the flip, size and arrow placement.
     * It uses the floating-ui/dom library to calculate the position.
     * @internal
     */
    private positionPopover;
    protected isEventFromTrigger(event: Event): boolean;
    /**
     * Detects if the current layout is in RTL (right-to-left) mode.
     * @returns True if RTL, false if LTR
     * @internal
     */
    protected isRtl(): boolean;
    /**
     * Adjusts the placement for RTL layouts by flipping left/right directions.
     * @param placement - The original placement value
     * @returns The adjusted placement for RTL or original placement for LTR
     * @internal
     */
    protected adjustPlacementForRtl(placement: PopoverPlacement): PopoverPlacement;
    render(): import("lit-html").TemplateResult<1>;
    static styles: Array<CSSResult>;
}
export default Popover;
