import type { WorkerPAGImage } from './pag-image';
import type { TextDocument } from '../types';
export declare class WorkerPAGFile {
    /**
     * Load pag file from file.
     */
    static load(worker: Worker, data: File | Blob | ArrayBuffer): Promise<WorkerPAGFile>;
    key: number;
    worker: Worker;
    isDestroyed: boolean;
    constructor(worker: Worker, key: number);
    /**
     * Get a text data of the specified index. The index ranges from 0 to numTexts - 1.
     * Note: It always returns the default text data.
     */
    getTextData(editableTextIndex: number): Promise<TextDocument & {
        key: number;
    }>;
    /**
     * Replace the text data of the specified index. The index ranges from 0 to PAGFile.numTexts - 1.
     * Passing in null for the textData parameter will reset it to default text data.
     */
    replaceText(editableTextIndex: number, textData: TextDocument & {
        [prop: string]: any;
    }): Promise<void>;
    /**
     * Replace the image content of the specified index with a PAGImage object. The index ranges from
     * 0 to PAGFile.numImages - 1. Passing in null for the image parameter will reset it to default
     * image content.
     */
    replaceImage(editableImageIndex: number, pagImage: WorkerPAGImage): Promise<any>;
    destroy(): Promise<void>;
}
