import type { ISnapshotBlockJson, ISnapshotBlockJsonResponse } from '@univerjs-pro/exchange-client';
import type { IPdfUnitData } from '@univerjs-pro/pdfs';
import { FUniver } from '@univerjs/core/facade';
/** @ignore */
export interface IFUniverPdfsExchangeClientMixin {
    /**
     * Import a PDF file into a persisted PDF unit.
     * @param {string | File} file File object or URL of the PDF file to import
     * @returns {Promise<string | undefined>} A promise that resolves to the imported unit ID, or `undefined` when the import does not produce a unit
     *
     * @example
     * ```typescript
     * // Accepts a File object
     * const unitId = await univerAPI.importPdfToUnitIdAsync(file);
     * // Or accepts a URL to a remote file
     * // const unitId = await univerAPI.importPdfToUnitIdAsync('https://example.com/document.pdf');
     * ```
     */
    importPdfToUnitIdAsync(file: File | string): Promise<string | undefined>;
    /**
     * Import a PDF file into PDF snapshot data.
     * @param {string | File} file File object or URL of the PDF file to import
     * @returns {Promise<IPdfUnitData | undefined>} A promise that resolves to PDF data, or `undefined` when the import does not produce a snapshot
     *
     * @example
     * ```typescript
     * // Accepts a File object
     * const pdfData = await univerAPI.importPdfToSnapshotAsync(file);
     * // Or accepts a URL to a remote file
     * // const pdfData = await univerAPI.importPdfToSnapshotAsync('https://example.com/document.pdf');
     * ```
     */
    importPdfToSnapshotAsync(file: File | string): Promise<IPdfUnitData | undefined>;
    /**
     * Export a persisted PDF unit as a PDF file.
     * @param {string} unitId ID of the PDF unit to export
     * @returns {Promise<File | undefined>} A promise that resolves to the exported PDF file, or `undefined` when the export does not produce a file
     *
     * @example
     * ```typescript
     * const file = await univerAPI.exportPdfByUnitIdAsync(unitId);
     * if (file) {
     *     univerAPI.downloadFile(file, 'document', 'pdf');
     * }
     * ```
     */
    exportPdfByUnitIdAsync(unitId: string): Promise<File | undefined>;
    /**
     * Export PDF snapshot data as a PDF file.
     * @param {IPdfUnitData} snapshot PDF data to export
     * @returns {Promise<File | undefined>} A promise that resolves to the exported PDF file, or `undefined` when the export does not produce a file
     *
     * @example
     * ```typescript
     * const pdf = univerAPI.getActivePdf();
     * if (pdf) {
     *     const file = await univerAPI.exportPdfBySnapshotAsync(pdf.save());
     *     if (file) {
     *         univerAPI.downloadFile(file, 'document', 'pdf');
     *     }
     * }
     * ```
     */
    exportPdfBySnapshotAsync(snapshot: IPdfUnitData): Promise<File | undefined>;
    /**
     * Convert PDF snapshot JSON returned by the exchange service into PDF data.
     * @param {ISnapshotBlockJsonResponse} json Snapshot JSON returned by the exchange service
     * @returns {Promise<IPdfUnitData>} A promise that resolves to PDF data
     *
     * @example
     * ```typescript
     * const pdfData = await univerAPI.transformSnapshotJsonToPdfDataAsync(snapshotJson);
     * ```
     */
    transformSnapshotJsonToPdfDataAsync(json: ISnapshotBlockJsonResponse): Promise<IPdfUnitData>;
    /**
     * Convert PDF data into snapshot JSON accepted by the exchange service.
     * @param {IPdfUnitData} pdfData PDF data to convert
     * @returns {Promise<ISnapshotBlockJson>} A promise that resolves to encoded Snapshot JSON
     *
     * @example
     * ```typescript
     * const pdf = univerAPI.getActivePdf();
     * if (pdf) {
     *     const snapshotJson = await univerAPI.transformPdfDataToSnapshotJsonAsync(pdf.save());
     * }
     * ```
     */
    transformPdfDataToSnapshotJsonAsync(pdfData: IPdfUnitData): Promise<ISnapshotBlockJson>;
}
export declare class FUniverPdfsExchangeClientMixin extends FUniver implements IFUniverPdfsExchangeClientMixin {
    importPdfToUnitIdAsync(file: File | string): Promise<string | undefined>;
    importPdfToSnapshotAsync(file: File | string): Promise<IPdfUnitData | undefined>;
    exportPdfByUnitIdAsync(unitId: string): Promise<File | undefined>;
    exportPdfBySnapshotAsync(snapshot: IPdfUnitData): Promise<File | undefined>;
    transformSnapshotJsonToPdfDataAsync(json: ISnapshotBlockJsonResponse): Promise<IPdfUnitData>;
    transformPdfDataToSnapshotJsonAsync(pdfData: IPdfUnitData): Promise<ISnapshotBlockJson>;
}
declare module '@univerjs/core/facade' {
    interface FUniver extends IFUniverPdfsExchangeClientMixin {
    }
}
