import { CanvasMediator, ComponentBaseProps, ComponentConfig, DataRequestConfig, ControlConfig, Position, Size } from 'ngx-puzzle/core';
import { Observable } from 'rxjs';
import { actionTypes, controlType } from '../../types';
import * as i0 from "@angular/core";
export declare class PuzzleCanvasMediatorService<TConfigProps extends ComponentBaseProps = ComponentBaseProps, TSubType = string> implements CanvasMediator<TConfigProps, TSubType> {
    private registry;
    private actionSnapshot;
    private historyActionStacks;
    private currentOperationType;
    private addComponentSubject;
    readonly componentAdd$: Observable<ComponentConfig<TConfigProps, TSubType>>;
    private componentSelectSubject;
    readonly componentSelect$: Observable<ComponentConfig<TConfigProps, TSubType>>;
    private updateComponentPropsSubject;
    readonly componentUpdateProps$: Observable<{
        id: string;
        props: TConfigProps;
    }>;
    private updateComponentConfigSubject;
    readonly componentUpdateConfig$: Observable<ComponentConfig<TConfigProps, TSubType>>;
    private movingComponentSubject;
    readonly componentMoving$: Observable<{
        id: string;
        position: Position;
    }>;
    private resizeComponentSubject;
    readonly componentResize$: Observable<{
        id: string;
        position: Position;
        size: Size;
    }>;
    private removeComponentSubject;
    readonly componentRemove$: Observable<string>;
    private drawerWideModeSubject;
    readonly drawerWideMode$: Observable<boolean>;
    private dataRequestSubject;
    readonly dataRequest$: Observable<{
        id: string;
        dataRequest: DataRequestConfig;
    }>;
    private controlsSubject;
    readonly controls$: Observable<{
        id: string;
        controls: Record<controlType, ControlConfig>;
    }>;
    private _currentSelectId;
    constructor();
    /**
     * 刷新指定操作类型的防抖历史记录
     */
    private flushPendingHistory;
    /**
     * 开始新操作前的准备工作
     */
    private prepareForNewOperation;
    /**
     * 防抖记录属性更新历史 - 使用 actionSnapshot 的快照
     */
    private debouncedRecordPropsHistory;
    /**
     * 防抖记录移动历史
     */
    private debouncedRecordMoveHistory;
    /**
     * 防抖记录缩放历史
     */
    private debouncedRecordResizeHistory;
    getCurrentSelect(): ComponentConfig<TConfigProps, TSubType>;
    addComponent(config: ComponentConfig<TConfigProps, TSubType>, recordHistory?: boolean): void;
    /**
     * 全量更新,慎用
     * @param config
     */
    updateComponentConfig(config: ComponentConfig<TConfigProps, TSubType>): void;
    /**
     * 更新但不通知
     * @param config
     */
    updateComponentData(config: ComponentConfig<TConfigProps, TSubType>): void;
    /**
     * 主要用于右侧面板更新通知子组件
     * @param id
     * @param props
     * @param recordHistory 更新历史记录
     */
    updateComponentProps(id: string, props: TConfigProps, recordHistory?: boolean): void;
    selectComponent(id: string): void;
    /**
     * 移动结束时防抖记录历史
     */
    movingComponent(id: string, position: Position, recordHistory?: boolean): void;
    /**
     * 缩放结束时防抖记录历史
     */
    resizeComponent(id: string, size: Size, position: Position, recordHistory?: boolean): void;
    removeComponent(id: string, recordHistory?: boolean): void;
    /**
     * 处理删除键按下事件
     */
    handleDeleteKeyPress(event: KeyboardEvent): void;
    recordHistory(config: ComponentConfig<TConfigProps, TSubType>, activeType: actionTypes): void;
    handleUndoKeyPress(event: KeyboardEvent): void;
    undoComponent(): void;
    setDrawerWideMode(isWide: boolean): void;
    updateDataRequest(id: string, dataRequest: DataRequestConfig): void;
    clearAllInputFocus(): void;
    /**
     * 重置 mediator 到初始状态
     */
    reset(): void;
    /**
     * 清空历史记录栈
     */
    clearHistory(): void;
    /**
     * 获取历史记录数量，用于调试
     */
    getHistoryCount(): number;
    /**
     * 获取当前选中的组件ID
     */
    getCurrentSelectedId(): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<PuzzleCanvasMediatorService<any, any>, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<PuzzleCanvasMediatorService<any, any>>;
}
