import { Component, ComponentDefinition, ComponentView, ComponentViewDefinition, Editor } from 'grapesjs';
import { default as _delay } from 'lodash-es/delay';
import { EditorPluginOptions } from './plugin-factory';

export declare const GALLERY_TAG_NAME = "cx-gallery";
export type GalleryTimerMap = WeakMap<Component, ReturnType<typeof _delay>>;
type GalleryViewThis = ComponentViewDefinition & ComponentView<Component>;
/**
 * `clearHover` defaults to clearing grapesjs's hovered model. The carousel
 * plugin passes a DOM mouseleave dispatch instead, because its lightbox
 * interaction needs a different cleanup path.
 */
export declare function createBlockHoverEvent(editor: Editor, clearHover?: () => void): (event: MouseEvent) => void;
export declare function handleOnRequestAsset(model: Component): void;
export declare function createHandleComponentChange(timerId: GalleryTimerMap, options?: {
    columnStyle?: ComponentDefinition['style'];
}): (model: Component) => void;
export declare function createInit({ editor, handleComponentChange, timerId, }: {
    editor: Editor;
    handleComponentChange: (model: Component) => void;
    timerId: GalleryTimerMap;
}): (model: Component) => void;
export declare function createRemoved({ handleComponentChange, timerId, }: {
    handleComponentChange: (model: Component) => void;
    timerId: GalleryTimerMap;
}): (model: Component) => void;
/**
 * Move a record one position. `wrap: true` makes the first/last item swap
 * with the last/first (used by the carousel in loop mode); `wrap: false`
 * leaves the boundary item in place (used by the gallery, which hides the
 * arrow button in that case).
 */
export declare function performMoveItem(model: Component, itemDetail: {
    id?: string;
    rawId?: string;
}, direction: 'left' | 'right', options?: {
    wrap?: boolean;
}): void;
/**
 * View methods that the gallery and carousel plugins share verbatim. Move,
 * config-hide/show, and the events() list stay in the caller because they
 * differ between plugins.
 */
export declare function createSharedViewMethods({ editor, handleComponentChange, }: {
    editor: Editor;
    handleComponentChange: (model: Component) => void;
}): Partial<ComponentViewDefinition> & ThisType<GalleryViewThis>;
declare const GalleryPlugin: (editor: Editor, editorOptions: EditorPluginOptions) => void;
export default GalleryPlugin;
