import { type WorkbookCommandReceipt, type WorkbookCommandRequest } from '@bilig/workbook';
import { type WorkbookCommandDescriptor } from '@bilig/workbook/features';
import type { SpreadsheetEngine } from './engine.js';
import type { WorkbookProjectionInterceptorService } from './workbook-projection-interceptors.js';
export interface WorkbookCommandHandlerContext {
    readonly engine: SpreadsheetEngine;
    readonly projection: WorkbookProjectionInterceptorService;
}
export type WorkbookCommandHandler = (request: WorkbookCommandRequest, context: WorkbookCommandHandlerContext) => WorkbookCommandReceipt | Promise<WorkbookCommandReceipt>;
export declare class WorkbookCommandService {
    private readonly engine;
    private readonly projection;
    private readonly commands;
    constructor(engine: SpreadsheetEngine, projection: WorkbookProjectionInterceptorService);
    registerCommand(descriptor: WorkbookCommandDescriptor, handler: WorkbookCommandHandler): () => void;
    listCommandDescriptors(): readonly WorkbookCommandDescriptor[];
    execute(request: WorkbookCommandRequest): Promise<WorkbookCommandReceipt>;
    preview(request: Omit<WorkbookCommandRequest, 'mode'>): Promise<WorkbookCommandReceipt>;
    apply(request: Omit<WorkbookCommandRequest, 'mode'>): Promise<WorkbookCommandReceipt>;
    applyAndVerify(request: Omit<WorkbookCommandRequest, 'mode'>): Promise<WorkbookCommandReceipt>;
}
