/// <reference types="lodash" />
import { TDToolType, TDUser, TldrawApp, TldrawCommand } from '@tldraw/tldraw';
import { TDCamera, TrawRoomUser, TrawSnapshot, TrawUser, TRBlock, TRBlockVoice, TRCamera, TREditorPadding, TRRecord, TRViewport } from 'types';
import { StoreApi } from 'zustand/vanilla';
import { EventTypeHandlerMap, TrawEventType } from 'state/events';
import { UseBoundStore } from 'zustand';
import { TrawAppOptions } from './TrawAppOptions';
export declare const convertCameraTRtoTD: (camera: TRCamera, viewport: TRViewport, padding?: TREditorPadding) => TDCamera;
export declare const convertCameraTDtoTR: (camera: TDCamera, viewport: TRViewport, padding?: TREditorPadding) => TRCamera;
export declare class TrawDrawApp extends TldrawApp {
    /**
     * Move backward in the undo/redo stack.
     */
    getStack: () => {
        stack: import("@tldraw/tldraw").Command<import("@tldraw/tldraw").TDSnapshot>[];
        pointer: number;
    };
}
export declare class TrawApp {
    /**
     * The Tldraw app. (https://tldraw.com)
     * This is used to create and edit slides.
     */
    app: TrawDrawApp;
    editorId: string;
    speechRecognitionLanguage: string;
    viewportSize: {
        width: number;
        height: number;
    };
    /**
     * A zustand store that also holds the state.
     */
    private store;
    /**
     * The current state.
     */
    private _state;
    protected pointer: number;
    /**
     * Event handlers
     * @private
     */
    private eventHandlersMap;
    /**
     * The time the current action started.
     * This is used to calculate the duration of the record.
     */
    private _actionStartTime;
    /**
     * Traw recorder
     */
    private _trawRecorder?;
    /**
     * A React hook for accessing the zustand store.
     */
    readonly useStore: UseBoundStore<StoreApi<TrawSnapshot>>;
    /**
     * Handle asset creation. Preprocess the file and upload it to the remote. Should return the asset URL.
     *
     * @returns - The asset URL
     */
    onAssetCreate?: (app: TldrawApp, file: File, id: string) => Promise<string | false>;
    requestMedia: ((app: TldrawApp) => void) | undefined;
    openAsset: () => void;
    requestUser?: (id: string) => Promise<TrawUser | undefined>;
    constructor({ user, document, records, speechRecognitionLanguage, playerOptions }: TrawAppOptions);
    registerApp(app: TrawDrawApp): void;
    private convertUndefinedToDelete;
    private convertDeleteToUndefined;
    private handleUndo;
    private handleRedo;
    private onPatch;
    updateViewportSize: (width: number, height: number) => void;
    zoomToSelection: () => TrawDrawApp | this;
    zoomToFit: () => TrawDrawApp | this;
    syncCamera: () => void;
    getCamera: (slideId: string) => TRCamera;
    handleCameraChange: (camera: TDCamera) => void;
    updateCameraFromOthers: (slideId: string, camera: TRCamera) => void;
    handleCameraRecord: import("lodash").DebouncedFunc<(camera: TRCamera) => void>;
    selectTool(tool: TDToolType): void;
    useSlidesStore(): import("@tldraw/tldraw").TDSnapshot;
    useTldrawApp(): TrawDrawApp;
    setActionStartTime: () => void;
    addUser: (user: TrawUser) => void;
    protected recordCommand: (app: TldrawApp, command: TldrawCommand) => void;
    addRecords: (records: TRRecord[]) => void;
    applyRecordsFromFirst: () => void;
    applyRecords: (records: TRRecord[], animation?: {
        current: number;
    }) => void;
    private applyAnimation;
    private removeDefaultPage;
    createSlide: () => void;
    deleteSlide: () => void;
    selectSlide: (id: string) => void;
    startRecording: () => Promise<void>;
    stopRecording: () => void;
    mute: () => void;
    unmute: () => void;
    private handleAssetCreate;
    private onChangePresence;
    readonly initializeRoom: (roomId: string, color: string) => void;
    readonly updateOthers: (tdOthers: TDUser[], trawOthers: TrawRoomUser[]) => void;
    createBlock: (block: TRBlock) => void;
    createBlockVoice: (blockId: string, voice: TRBlockVoice) => void;
    addBlocks: (blocks: TRBlock[]) => void;
    editBlock: (blockId: string, text: string) => void;
    deleteBlock: (blockId: string) => void;
    getPlayableVoice: (block: TRBlock | undefined) => TRBlockVoice | undefined;
    private audioInstance;
    playBlock(blockId: string): void;
    playFromFirstBlock: () => void;
    pause: () => void;
    togglePlay: () => void;
    resume: () => void;
    private playInterval;
    private stopPlay;
    private _getNextBlock;
    private _handlePlay;
    togglePanel: () => void;
    setPadding: (padding: Partial<TREditorPadding>) => void;
    backToEditor: () => void;
    on<K extends TrawEventType>(eventType: K, handler: EventTypeHandlerMap[K]): void;
    off<K extends keyof EventTypeHandlerMap>(eventType: K, handler: EventTypeHandlerMap[K]): void;
    private emit;
}
//# sourceMappingURL=TrawApp.d.ts.map