import { type MediaClientErrorReason, type RequestMetadata } from '@atlaskit/media-client';
import { type ZipEntry } from 'unzipit';
export declare class MediaViewerError extends Error {
    readonly primaryReason: MediaViewerErrorReason | ArchiveViewerErrorReason;
    readonly secondaryError?: Error | undefined;
    constructor(primaryReason: MediaViewerErrorReason | ArchiveViewerErrorReason, secondaryError?: Error | undefined);
}
export declare function isMediaViewerError(err: Error): err is MediaViewerError;
export declare class ArchiveViewerError extends MediaViewerError {
    readonly primaryReason: ArchiveViewerErrorReason;
    readonly secondaryError?: Error | undefined;
    readonly zipEntry?: ZipEntry | undefined;
    constructor(primaryReason: ArchiveViewerErrorReason, secondaryError?: Error | undefined, zipEntry?: ZipEntry | undefined);
}
export declare function isArchiveViewerError(err: Error): err is ArchiveViewerError;
export type MediaViewerErrorReason = 'collection-fetch-metadata' | 'header-fetch-metadata' | 'itemviewer-onerror' | 'itemviewer-fetch-metadata' | 'itemviewer-file-error-status' | 'itemviewer-file-failed-processing-status' | 'imageviewer-external-onerror' | 'imageviewer-fetch-url' | 'imageviewer-src-onerror' | 'audioviewer-fetch-url' | 'audioviewer-missing-artefact' | 'audioviewer-playback' | 'videoviewer-fetch-url' | 'videoviewer-missing-artefact' | 'videoviewer-playback' | 'docviewer-fetch-url' | 'docviewer-content-fetch-failed' | 'docviewer-fetch-pdf' | 'codeviewer-fetch-src' | 'codeviewer-load-src' | 'codeviewer-file-size-exceeds' | 'codeviewer-parse-email' | 'svg-img-error' | 'svg-binary-fetch' | 'svg-unknown-error' | 'svg-blob-to-datauri' | 'unsupported' | 'custom-viewer-error' | 'download';
export type ArchiveViewerErrorReason = 'archiveviewer-bundle-loader' | 'archiveviewer-read-binary' | 'archiveviewer-create-url' | 'archiveviewer-imageviewer-onerror' | 'archiveviewer-videoviewer-onerror' | 'archiveviewer-audioviewer-onerror' | 'archiveviewer-docviewer-onerror' | 'archiveviewer-codeviewer-onerror' | 'archiveviewer-codeviewer-file-size-exceeds' | 'archiveviewer-missing-name-src' | 'archiveviewer-unsupported' | 'archiveviewer-encrypted-entry' | 'archiveviewer-customrenderer-onerror';
export type PrimaryErrorReason = MediaViewerErrorReason | ArchiveViewerErrorReason;
export type SecondaryErrorReason = MediaClientErrorReason | 'unknown' | 'nativeError' | undefined;
export declare function getPrimaryErrorReason(error: MediaViewerError): PrimaryErrorReason;
export declare function getSecondaryErrorReason(error: MediaViewerError): SecondaryErrorReason;
export declare function getErrorDetail(error?: MediaViewerError): string;
export declare function getRequestMetadata(error?: MediaViewerError): RequestMetadata | undefined;
