import { type ThunkAction } from '@reduxjs/toolkit';
import { type SerializedControl } from '../../builder';
import { type PropControllerMessage } from '../../prop-controllers/instances';
import { type Document } from '../modules/read-only-documents';
import { type BoxModel } from '../modules/box-models';
import { type ComponentMeta } from '../modules/components-meta';
import { type Size } from '../react-builder-preview';
import { type DocumentPayload, type SharedAction } from '../shared-api';
export declare const BuilderActionTypes: {
    readonly MAKESWIFT_CONNECTION_CHECK: "MAKESWIFT_CONNECTION_CHECK";
    readonly CHANGE_ELEMENT_BOX_MODELS: "CHANGE_ELEMENT_BOX_MODELS";
    readonly MOUNT_COMPONENT: "MOUNT_COMPONENT";
    readonly UNMOUNT_COMPONENT: "UNMOUNT_COMPONENT";
    readonly CHANGE_DOCUMENT_ELEMENT_SIZE: "CHANGE_DOCUMENT_ELEMENT_SIZE";
    readonly MESSAGE_BUILDER_PROP_CONTROLLER: "MESSAGE_BUILDER_PROP_CONTROLLER";
    readonly HANDLE_WHEEL: "HANDLE_WHEEL";
    readonly HANDLE_POINTER_MOVE: "HANDLE_POINTER_MOVE";
    readonly ELEMENT_FROM_POINT_CHANGE: "ELEMENT_FROM_POINT_CHANGE";
    readonly REGISTER_BUILDER_DOCUMENT: "REGISTER_BUILDER_DOCUMENT";
    readonly UNREGISTER_BUILDER_DOCUMENT: "UNREGISTER_BUILDER_DOCUMENT";
    readonly REGISTER_BUILDER_COMPONENT: "REGISTER_BUILDER_COMPONENT";
    readonly UNREGISTER_BUILDER_COMPONENT: "UNREGISTER_BUILDER_COMPONENT";
    readonly HANDLE_HOST_NAVIGATE: "HANDLE_HOST_NAVIGATE";
    readonly MAKESWIFT_CONNECTION_INIT: "MAKESWIFT_CONNECTION_INIT";
    readonly REGISTER_DOCUMENT: "REGISTER_DOCUMENT";
    readonly UNREGISTER_DOCUMENT: "UNREGISTER_DOCUMENT";
    readonly SET_BREAKPOINTS: "SET_BREAKPOINTS";
    readonly SET_LOCALE: "SET_LOCALE";
};
type ActionWithTransferables<A> = A & {
    transferables?: Transferable[];
};
type MakeswiftConnectionCheckAction = {
    type: typeof BuilderActionTypes.MAKESWIFT_CONNECTION_CHECK;
    payload: {
        currentUrl: string;
    };
};
type ChangeElementBoxModelsAction = {
    type: typeof BuilderActionTypes.CHANGE_ELEMENT_BOX_MODELS;
    payload: {
        changedElementBoxModels: Map<string, Map<string, BoxModel | null>>;
    };
};
type MountComponentAction = {
    type: typeof BuilderActionTypes.MOUNT_COMPONENT;
    payload: {
        documentKey: string;
        elementKey: string;
    };
};
type UnmountComponentAction = {
    type: typeof BuilderActionTypes.UNMOUNT_COMPONENT;
    payload: {
        documentKey: string;
        elementKey: string;
    };
};
type ChangeDocumentElementSizeAction = {
    type: typeof BuilderActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE;
    payload: {
        size: Size;
    };
};
type MessageBuilderPropControllerAction<T = PropControllerMessage> = {
    type: typeof BuilderActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER;
    payload: {
        documentKey: string;
        elementKey: string;
        propName: string;
        message: T;
    };
};
type HandleWheelAction = {
    type: typeof BuilderActionTypes.HANDLE_WHEEL;
    payload: {
        deltaX: number;
        deltaY: number;
    };
};
type HandlePointerMoveAction = {
    type: typeof BuilderActionTypes.HANDLE_POINTER_MOVE;
    payload: {
        clientX: number;
        clientY: number;
    };
};
type ElementFromPointChangeAction = {
    type: typeof BuilderActionTypes.ELEMENT_FROM_POINT_CHANGE;
    payload: {
        keys: {
            documentKey: string;
            elementKey: string;
        } | null;
    };
};
type RegisterBuilderDocumentAction = {
    type: typeof BuilderActionTypes.REGISTER_BUILDER_DOCUMENT;
    payload: {
        documentKey: string;
        document: DocumentPayload;
    };
};
type UnregisterBuilderDocumentAction = {
    type: typeof BuilderActionTypes.UNREGISTER_BUILDER_DOCUMENT;
    payload: {
        documentKey: string;
    };
};
type RegisterBuilderComponentAction = {
    type: typeof BuilderActionTypes.REGISTER_BUILDER_COMPONENT;
    payload: {
        type: string;
        meta: ComponentMeta;
        serializedControls: Record<string, SerializedControl>;
    };
};
type UnregisterBuilderComponentAction = {
    type: typeof BuilderActionTypes.UNREGISTER_BUILDER_COMPONENT;
    payload: {
        type: string;
    };
};
type HandleHostNavigateAction = {
    type: typeof BuilderActionTypes.HANDLE_HOST_NAVIGATE;
    payload: {
        url: string | null;
    };
};
export type BuilderAction = SharedAction | MakeswiftConnectionCheckAction | ChangeElementBoxModelsAction | MountComponentAction | UnmountComponentAction | ChangeDocumentElementSizeAction | MessageBuilderPropControllerAction | HandleWheelAction | HandlePointerMoveAction | ElementFromPointChangeAction | RegisterBuilderDocumentAction | UnregisterBuilderDocumentAction | RegisterBuilderComponentAction | UnregisterBuilderComponentAction | HandleHostNavigateAction;
export declare function makeswiftConnectionCheck(payload: MakeswiftConnectionCheckAction['payload']): MakeswiftConnectionCheckAction;
export declare function changeElementBoxModels(changedElementBoxModels: Map<string, Map<string, BoxModel | null>>): ChangeElementBoxModelsAction;
export declare function mountComponent(documentKey: string, elementKey: string): MountComponentAction;
export declare function unmountComponent(documentKey: string, elementKey: string): UnmountComponentAction;
export declare function mountComponentEffect(documentKey: string, elementKey: string): ThunkAction<() => void, unknown, unknown, BuilderAction>;
export declare function changeDocumentElementSize(size: Size): ChangeDocumentElementSizeAction;
export declare function messageBuilderPropController<T>(documentKey: string, elementKey: string, propName: string, message: T): MessageBuilderPropControllerAction<T>;
export declare function handleWheel(payload: {
    deltaX: number;
    deltaY: number;
}): HandleWheelAction;
export declare function handlePointerMove(payload: {
    clientX: number;
    clientY: number;
}): HandlePointerMoveAction;
export declare function elementFromPointChange(keys: {
    documentKey: string;
    elementKey: string;
} | null): ElementFromPointChangeAction;
export declare function registerBuilderDocument(document: Document): RegisterBuilderDocumentAction;
export declare function unregisterBuilderDocument(documentKey: string): UnregisterBuilderDocumentAction;
export declare function registerBuilderDocumentsEffect(documents: Document[]): ThunkAction<() => void, unknown, unknown, BuilderAction>;
export declare function registerBuilderComponent(payload: RegisterBuilderComponentAction['payload'], transferables?: Transferable[]): ActionWithTransferables<RegisterBuilderComponentAction>;
export declare function unregisterBuilderComponent(payload: UnregisterBuilderComponentAction['payload']): UnregisterBuilderComponentAction;
export declare function hasTransferables<A extends BuilderAction>(action: A): action is ActionWithTransferables<A>;
export {};
//# sourceMappingURL=actions.d.ts.map