import { type FlipOptions } from "@floating-ui/react-dom";
import React, { type HTMLAttributes } from "react";
import type { AsChildProps } from "../../types";
import { type Align, type Measurable, type Side } from "./Floating.utils";
/**
 * Used for menus that prefer top/bottom placements and
 * use height-var to limit their height.
 */
declare const MENU_COLLISION_AVOIDANCE: {
    readonly fallbackAxisSide: "none";
};
/**
 * Used by regular popovers that usually aren't scrollable and are allowed to
 * freely flip to any axis of placement.
 */
declare const POPOVER_COLLISION_AVOIDANCE: {
    readonly fallbackAxisSide: "end";
};
/**
 * Floating Root
 */
type FloatingContextValue = {
    anchor: Measurable | null;
    onAnchorChange: (anchor: Measurable | null) => void;
};
export declare const FloatingProvider: React.FC<FloatingContextValue & {
    children: React.ReactNode;
    ref?: never;
}>, useFloatingContext: <S extends boolean = true>(strict?: S | undefined, errorMessageOverride?: string) => S extends true ? FloatingContextValue : FloatingContextValue | undefined;
interface FloatingProps {
    children: React.ReactNode;
}
interface FloatingComponent extends React.FC<FloatingProps> {
    Anchor: typeof FloatingAnchor;
    Content: typeof FloatingContent;
}
declare const Floating: FloatingComponent;
/**
 * Floating Anchor
 */
type FloatingAnchorProps = HTMLAttributes<HTMLDivElement> & AsChildProps & {
    virtualRef?: Measurable;
};
/**
 * `FloatingAnchor` provides an anchor for a Floating instance.
 * Allows anchoring to non-DOM nodes like a cursor position when used with `virtualRef`.
 */
declare const FloatingAnchor: React.ForwardRefExoticComponent<FloatingAnchorProps & React.RefAttributes<HTMLDivElement>>;
type Boundary = Element | null;
interface FloatingContentProps extends HTMLAttributes<HTMLDivElement> {
    side?: Side;
    sideOffset?: number;
    align?: Align;
    alignOffset?: number;
    avoidCollisions?: boolean;
    collisionBoundary?: Boundary | Boundary[];
    collisionPadding?: number | Partial<Record<Side, number>>;
    hideWhenDetached?: boolean;
    updatePositionStrategy?: "optimized" | "always";
    fallbackPlacements?: FlipOptions["fallbackPlacements"];
    fallbackAxisSideDirection?: FlipOptions["fallbackAxisSideDirection"];
    onPlaced?: () => void;
    /**
     * @default true
     */
    enabled?: boolean;
    /**
     * Only use this option if your floating element is conditionally rendered, not hidden with CSS.
     * @default true
     */
    autoUpdateWhileMounted?: boolean;
    arrow?: {
        className?: string;
        padding?: number;
        width: number;
        height: number;
    };
}
declare const FloatingContent: React.ForwardRefExoticComponent<FloatingContentProps & React.RefAttributes<HTMLDivElement>>;
export { Floating, MENU_COLLISION_AVOIDANCE, POPOVER_COLLISION_AVOIDANCE };
