import * as React from 'react';
import { CanvasApi, CanvasContext } from '../diagram/canvasApi';
import { Element, Link } from '../diagram/elements';
import { Size, Vector } from '../diagram/geometry';
export interface DialogProps extends DialogStyleProps {
    target?: Element | Link;
    onHide: () => void;
    centered?: boolean;
    children: React.ReactNode;
}
/**
 * Dialog style, placement and sizing options.
 */
export interface DialogStyleProps {
    /**
     * Default size for the dialog.
     *
     * @default {width: 300, height: 320}
     */
    defaultSize?: Size;
    /**
     * Minimum size for the dialog when resizing.
     *
     * @default {width: 250, height: 250}
     */
    minSize?: Size;
    /**
     * Maximum size for the dialog when resizing.
     *
     * @default {width: 800, height: 800}
     */
    maxSize?: Size;
    /**
     * Allowed directions to resize the dialog:
     *  - `none` - disallow resize;
     *  - `x` - allow only horizontal resize;
     *  - `y` - allow only vertical resize;
     *  - `all` - allow both horizontal and vertical resize.
     *
     * @default "all"
     */
    resizableBy?: 'none' | 'x' | 'y' | 'all';
    /**
     * Dialog caption which is displayed in its header.
     */
    caption: string;
    /**
     * Whether the dialog should display a close button in the header.
     *
     * @default true
     */
    closable?: boolean;
    offset?: Vector;
    calculatePosition?: (canvas: CanvasApi) => Vector | undefined;
}
interface State {
    width?: number;
    height?: number;
}
export declare class Dialog extends React.Component<DialogProps, State> {
    static contextType: React.Context<CanvasContext | null>;
    readonly context: CanvasContext;
    private unsubscribeFromTarget;
    private readonly handler;
    private updateAll;
    private startSize;
    constructor(props: DialogProps);
    componentDidMount(): void;
    componentDidUpdate(prevProps: DialogProps): void;
    componentWillUnmount(): void;
    private listenToTarget;
    private listenToElement;
    private listenToLink;
    private calculatePositionForElement;
    private calculatePositionForLink;
    private calculatePosition;
    private getViewPortScrollablePoints;
    private getDialogScrollablePoints;
    private focusOn;
    private onStartDragging;
    private calculateHeight;
    private calculateWidth;
    private onDragHandle;
    render(): import("react/jsx-runtime").JSX.Element;
}
export {};
//# sourceMappingURL=dialog.d.ts.map