import './Popover.css';
import React from 'react';
import { ClickOutsideHandler } from '../../hooks/useClickOutside';
import { PropsWithJsxAttributes } from '../../utils/types/PropsWithJsxAttributes';
/**
 * Стороны упорядочены по приоритету:
 * Используется первая сторона, в которую смог вписаться поповер.
 */
export declare const directionsStartCenter: readonly ["downCenter", "upCenter", "downRight", "downLeft", "upRight", "upLeft", "leftUp", "leftCenter", "leftDown", "rightUp", "rightCenter", "rightDown"];
export declare const directionsStartEdge: readonly ["downStartLeft", "upStartLeft", "downStartRight", "upStartRight", "leftStartUp", "leftStartDown", "rightStartUp", "rightStartDown"];
export declare const popoverPropOffset: readonly ["3xs", "2xs", "xs", "s", "m", "l", "xl", "2xl", "3xl", "4xl", "5xl", "6xl"];
export type PopoverPropOffset = typeof popoverPropOffset[number] | number;
export declare const directions: ("downCenter" | "upCenter" | "downRight" | "downLeft" | "upRight" | "upLeft" | "leftUp" | "leftCenter" | "leftDown" | "rightUp" | "rightCenter" | "rightDown" | "downStartLeft" | "upStartLeft" | "downStartRight" | "upStartRight" | "leftStartUp" | "leftStartDown" | "rightStartUp" | "rightStartDown")[];
export type Direction = typeof directions[number];
export type Position = {
    x: number;
    y: number;
} | undefined;
export type PositioningProps = {
    anchorRef: React.RefObject<HTMLElement>;
    equalAnchorWidth?: boolean;
    position?: never;
} | {
    anchorRef?: never;
    equalAnchorWidth?: never;
    position: Position;
};
type ChildrenRenderProp = (direction: Direction) => React.ReactNode;
export type PopoverProps = PropsWithJsxAttributes<{
    direction?: Direction;
    spareDirection?: Direction;
    offset?: PopoverPropOffset;
    arrowOffset?: number;
    possibleDirections?: readonly Direction[];
    isInteractive?: boolean;
    children: React.ReactNode | ChildrenRenderProp;
    onClickOutside?: ClickOutsideHandler;
    onSetDirection?: (direction: Direction) => void;
    viewportRef?: React.RefObject<HTMLElement>;
    container?: Element;
} & PositioningProps>;
export type Props = PopoverProps;
export declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
export {};
