import type { HTMLAttributes } from "react";
import type { DialogOptions } from "../dialog/dialog.js";
import type { As, Props } from "../utils/types.js";
import type { PopoverStore } from "./popover-store.js";
type AnchorRect = {
    x?: number;
    y?: number;
    width?: number;
    height?: number;
};
/**
 * Returns props to create a `Popover` component.
 * @see https://ariakit.org/components/popover
 * @example
 * ```jsx
 * const store = usePopoverStore();
 * const props = usePopover({ store });
 * <Role {...props}>Popover</Role>
 * ```
 */
export declare const usePopover: import("../utils/types.js").Hook<PopoverOptions<"div">>;
/**
 * Renders a popover element.
 * @see https://ariakit.org/components/popover
 * @example
 * ```jsx
 * const popover = usePopoverStore();
 * <PopoverDisclosure store={popover}>Disclosure</PopoverDisclosure>
 * <Popover store={popover}>Popover</Popover>
 * ```
 */
export declare const Popover: import("../utils/types.js").Component<PopoverOptions<"div">>;
export interface PopoverOptions<T extends As = "div"> extends DialogOptions<T> {
    /**
     * Object returned by the `usePopoverStore` hook.
     * @see https://ariakit.org/guide/component-stores
     */
    store: PopoverStore;
    /**
     * Props that will be passed to the popover wrapper element. This element will
     * be used to position the popover.
     */
    wrapperProps?: HTMLAttributes<HTMLDivElement>;
    /**
     * Whether the popover has `position: fixed` or not.
     * @default false
     */
    fixed?: boolean;
    /**
     * The distance between the popover and the anchor element.
     * @default 0
     */
    gutter?: number;
    /**
     * The skidding of the popover along the anchor element. Can be set to
     * negative values to make the popover shift to the opposite side.
     * @default 0
     */
    shift?: number;
    /**
     * Controls the behavior of the popover when it overflows the viewport:
     *   - If a `boolean`, specifies whether the popover should flip to the
     *     opposite side when it overflows.
     *   - If a `string`, indicates the preferred fallback placements when it
     *     overflows. The placements must be spaced-delimited, e.g. "top left".
     * @default true
     */
    flip?: boolean | string;
    /**
     * Whether the popover should slide when it overflows.
     * @default true
     */
    slide?: boolean;
    /**
     * Whether the popover can overlap the anchor element when it overflows.
     * @default false
     */
    overlap?: boolean;
    /**
     * Whether the popover should have the same width as the anchor element. This
     * will be exposed to CSS as
     * [`--popover-anchor-width`](https://ariakit.org/guide/styling#--popover-anchor-width).
     * @default false
     */
    sameWidth?: boolean;
    /**
     * Whether the popover should fit the viewport. If this is set to true, the
     * popover wrapper will have `maxWidth` and `maxHeight` set to the viewport
     * size. This will be exposed to CSS as
     * [`--popover-available-width`](https://ariakit.org/guide/styling#--popover-available-width)
     * and
     * [`--popover-available-height`](https://ariakit.org/guide/styling#--popover-available-height).
     * @default false
     */
    fitViewport?: boolean;
    /**
     * The minimum padding between the arrow and the popover corner.
     * @default 4
     */
    arrowPadding?: number;
    /**
     * The minimum padding between the popover and the viewport edge. This will be
     * exposed to CSS as
     * [`--popover-overflow-padding`](https://ariakit.org/guide/styling#--popover-overflow-padding).
     * @default 8
     */
    overflowPadding?: number;
    /**
     * Function that returns the anchor element's DOMRect. If this is explicitly
     * passed, it will override the anchor `getBoundingClientRect` method.
     *
     * Live examples:
     *  - [Textarea with inline combobox](https://ariakit.org/examples/combobox-textarea)
     *  - [Standalone Popover](https://ariakit.org/examples/popover-standalone)
     *  - [Context menu](https://ariakit.org/examples/menu-context-menu)
     *  - [Selection Popover](https://ariakit.org/examples/popover-selection)
     * @param anchor The anchor element.
     */
    getAnchorRect?: (anchor: HTMLElement | null) => AnchorRect | null;
    /**
     * A callback that will be called when the popover needs to calculate its
     * position. This will override the internal `updatePosition` function. The
     * original `updatePosition` function will be passed as an argument, so it can
     * be called inside the callback to apply the default behavior.
     *
     * Live examples:
     *  - [Responsive Popover](https://ariakit.org/examples/popover-responsive)
     */
    updatePosition?: (props: {
        updatePosition: () => Promise<void>;
    }) => void | Promise<void>;
}
export type PopoverProps<T extends As = "div"> = Props<PopoverOptions<T>>;
export {};
