import { Slot } from '@blockeditor/global/utils';
import { type BlockSnapshot, Job, type PageSnapshot } from '@blockeditor/store';
import { Bound } from '../index.js';
import type { SurfaceBlockModel } from '../surface-model.js';
/**
 * Template type will affect the inserting behaviour
 */
declare const TEMPLATE_TYPES: readonly ["template", "sticker"];
type TemplateType = (typeof TEMPLATE_TYPES)[number];
export type SlotBlockPayload = {
    type: 'block';
    data: {
        blockJson: BlockSnapshot;
        parent?: string;
        index?: number;
    };
};
export type SlotPayload = SlotBlockPayload | {
    type: 'template';
    template: PageSnapshot;
    bound: Bound | null;
};
export type TemplateJobConfig = {
    model: SurfaceBlockModel;
    type: string;
    middlewares: ((job: TemplateJob) => void)[];
};
export declare class TemplateJob {
    static create(options: {
        model: SurfaceBlockModel;
        type: string;
        middlewares: ((job: TemplateJob) => void)[];
    }): TemplateJob;
    static middlewares: ((job: TemplateJob) => void)[];
    private _template;
    job: Job;
    model: SurfaceBlockModel;
    type: TemplateType;
    slots: {
        beforeInsert: Slot<SlotBlockPayload | {
            type: 'template';
            template: PageSnapshot;
            bound: Bound | null;
        }>;
    };
    constructor({ model, type, middlewares }: TemplateJobConfig);
    walk(callback: (block: BlockSnapshot, template: PageSnapshot) => void): void;
    private _mergeSurfaceElements;
    private _mergeProps;
    private _getMergeBlockId;
    private _getTemplateBound;
    private _jsonToModelData;
    private _insertToPage;
    insertTemplate(template: unknown): Promise<Bound | null>;
}
export {};
//# sourceMappingURL=template.d.ts.map