import React from 'react'; import type { MediaClient } from '@atlaskit/media-client/media-client'; import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types'; import type { FileState } from '@atlaskit/media-state/file-state'; import { Outcome } from '../../domain/outcome'; import { MediaViewerError } from '../../MediaViewerError'; import { BaseViewer } from '../base-viewer'; export type ObjectUrl = string; export type ImageViewerProps = { mediaClient: MediaClient; item: FileState; collectionName?: string; onLoad: () => void; onError: (error: MediaViewerError) => void; onClose?: () => void; contextId?: string; traceContext: MediaTraceContext; }; export interface ImageViewerContent { objectUrl: ObjectUrl; originalBinaryImageUrl?: string; orientation?: number; clientId?: string; } export declare class ImageViewer extends BaseViewer { protected get initialState(): { content: Outcome; }; private cancelImageFetch?; /** Counts `init` calls, so an `init` that a reset has replaced can tell it is stale. */ private initRuns; protected init(): Promise; protected release(): void; revokeObjectUrl(objectUrl: string): void; protected renderSuccessful(content: ImageViewerContent): React.JSX.Element | null; private onLoad; private onImgError; }