import type { CSSProperties, ComponentType, ForwardRefExoticComponent, PropsWithoutRef, ReactNode, RefAttributes } from 'react';
import type { KeyboardShortcut } from './shortcuts.js';
export type LayoutTypes = 'drawer' | 'dialog' | 'fullscreen' | 'floating' | 'manual';
export type Layout = LayoutTypes | {
    desktop: LayoutTypes;
    mobile: LayoutTypes;
};
export type Placement = 'overlay' | 'top-start' | 'top' | 'top-end' | 'right-start' | 'right-start--custom-offset' | 'right' | 'right-end' | 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end';
export type ModalPositioning = {
    referenceElement?: $TSFixMe;
    placement?: Placement;
};
export type Modal<P = unknown, R = unknown> = {
    id: string;
    Component: ComponentType<P> | ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<R>>;
    componentProps: Omit<P, 'modalSessionId'>;
    layout: Layout;
    type?: 'exclusive';
    shortcuts?: KeyboardShortcut[];
    autoFocus?: boolean;
    initialFocus?: string | HTMLElement | (() => HTMLElement) | false;
    disableArrowNavigation?: boolean;
    disableCloseOnEscape?: boolean;
    noPadding?: boolean;
    positioning?: ModalPositioning;
    returnFocusToEditor?: boolean;
    focusReturnElement?: HTMLElement;
    onClickOutside?: ((event: PointerEvent) => void) | {
        on: 'pointerdown' | 'pointerup';
        handler: (event: PointerEvent) => void;
    };
    entryType?: string;
    dropdownValue?: string;
    withTransition?: boolean;
    sticky?: boolean;
} & ({
    enableDrag?: false;
} | {
    enableDrag: true;
    dragHandleSelector: string;
});
export type PluginPanel<P, R> = {
    id: string;
    Component: React.ComponentType<P> | ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<R>>;
    componentProps: Omit<P, 'modalSessionId'>;
    isMobile: boolean;
    positioning: ModalPositioning;
    returnFocusToEditor?: boolean;
    focusReturnElement?: HTMLElement;
    mobileLayout?: LayoutTypes;
    autoFocus?: boolean;
    initialFocus?: string | HTMLElement | (() => HTMLElement) | false;
    entryType?: string;
    onClickOutside?: ((event: PointerEvent) => void) | {
        on: 'pointerdown' | 'pointerup';
        handler: (event: PointerEvent) => void;
    };
    dropdownValue?: string;
    type?: 'exclusive';
};
export type ModalHandle<P, R> = {
    patchProps: (newProps: Partial<P>) => void;
    close: () => void;
    modalRef: {
        current: R | null;
    };
};
export type ModalProps = {
    children: ReactNode;
    modalConfig: Modal;
    className?: string;
    closeModal: () => void;
    zIndex: CSSProperties['zIndex'];
};
//# sourceMappingURL=modal-types.d.ts.map