import { MediaSingleLayout } from '@uidu/adf-schema';
import type { MediaProvider } from '@uidu/editor-common';
import { MediaClientConfig } from '@uidu/media-core';
import { Node, Node as PMNode, Schema } from 'prosemirror-model';
import { EditorState, Plugin } from 'prosemirror-state';
import { EditorView } from 'prosemirror-view';
import { Dispatch } from '../../../event-dispatcher';
import { ProsemirrorGetPosHandler } from '../../../nodeviews';
import { MediaPluginOptions } from '../media-plugin-options';
import type { MediaOptions, MediaState } from '../types';
import type { MediaNodeWithPosHandler, MediaPluginState } from './types';
export { stateKey } from './plugin-key';
export type { MediaState, MediaProvider };
export declare class MediaPluginStateImplementation implements MediaPluginState {
    allowsUploads: boolean;
    mediaClientConfig?: MediaClientConfig;
    uploadMediaClientConfig?: MediaClientConfig;
    ignoreLinks: boolean;
    waitForMediaUpload: boolean;
    allUploadsFinished: boolean;
    showDropzone: boolean;
    element?: HTMLElement;
    layout: MediaSingleLayout;
    mediaNodes: MediaNodeWithPosHandler[];
    mediaGroupNodes: Record<string, any>;
    mobileUploadComplete: Record<string, boolean>;
    options: MediaPluginOptions;
    mediaProvider?: MediaProvider;
    private pendingTask;
    private view;
    private destroyed;
    private errorReporter;
    private popupPicker?;
    private customPicker?;
    private removeOnCloseListener;
    private openMediaPickerBrowser?;
    private onPopupToogleCallback;
    private reactContext;
    pickers: [];
    editingMediaSinglePos?: number;
    showEditingDialog?: boolean;
    mediaOptions?: MediaOptions;
    dispatch?: Dispatch;
    constructor(state: EditorState, options: MediaPluginOptions, reactContext: () => {}, mediaOptions?: MediaOptions, dispatch?: Dispatch);
    setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<any>;
    getMediaOptions: () => MediaPluginOptions;
    updateElement(): void;
    private getDomElement;
    /**
     * we insert a new file by inserting a initial state for that file.
     *
     * called when we insert a new file via the picker (connected via pickerfacade)
     */
    insertFiles: (files: MediaState[]) => void;
    splitMediaGroup: () => boolean;
    onPopupPickerClose: () => void;
    showMediaPicker: () => any;
    onPopupToggle: (onPopupToogleCallback: (isOpen: boolean) => void) => void;
    setView(view: EditorView): void;
    /**
     * Called from React UI Component when user clicks on "Delete" icon
     * inside of it
     */
    handleMediaNodeRemoval: (node: PMNode, getPos: ProsemirrorGetPosHandler) => void;
    /**
     * Called from React UI Component on componentDidMount
     */
    handleMediaNodeMount: (node: PMNode, getPos: ProsemirrorGetPosHandler) => void;
    /**
     * Called from React UI Component on componentWillUnmount and componentWillReceiveProps
     * when React component's underlying node property is replaced with a new node
     */
    handleMediaNodeUnmount: (oldNode: PMNode) => void;
    destroy(): any;
    findMediaNode: (id: string) => MediaNodeWithPosHandler | null;
    private destroyAllPickers;
    private destroyPickers;
    private initPickers;
    trackNewMediaEvent(mediaState: MediaState): any;
    private getInputMethod;
    updateMediaNodeAttrs: (id: string, attrs: object, isMediaSingle: boolean) => boolean;
    removeNodeById: (state: MediaState) => void;
    removeSelectedMediaContainer: () => boolean;
    selectedMediaContainerNode: () => Node | undefined;
    handleDrag: (dragState: 'enter' | 'leave') => any;
}
export declare const getMediaPluginState: (state: EditorState) => MediaPluginState;
export declare const createPlugin: (_schema: Schema, options: MediaPluginOptions, reactContext: () => {}, dispatch?: Dispatch, mediaOptions?: MediaOptions) => Plugin<any>;
