import * as React from "react";
import * as PropTypes from "prop-types";
import { FieldProps, JSONSchemaArray, JSONSchemaObject } from "../../types";
import ApiClient from "../../ApiClient";
interface ProcessedFile {
    dataURL: string;
    name: string;
    size: number;
    type: File["type"];
}
interface ImageArrayFieldState extends MediaArrayState {
    modalMediaSrc: string;
}
interface MediaMetadataSchema {
    capturerVerbatim?: string[];
    intellectualOwner?: string;
    intellectualRights?: string;
}
interface ProcessedExifData {
    formData?: any;
    defaultMediaMetadata?: any;
}
export default class ImageArrayField extends React.Component<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>, ImageArrayFieldState> {
    ALLOWED_FILE_TYPES: string[];
    ACCEPT_FILE_TYPES: string[];
    MAX_FILE_SIZE: number;
    KEY: string;
    ENDPOINT: string;
    GLYPH: string;
    TRANSLATION_TAKE_NEW: string;
    TRANSLATION_SELECT_FILE: string;
    TRANSLATION_NO_MEDIA: string;
    CONTAINER_CLASS: string;
    METADATA_FORM_ID: string;
    renderMedia: (id: string) => JSX.Element;
    renderLoadingMedia: (id: string) => JSX.Element;
    onMediaClick: (i: number) => any;
    renderModalMedia: () => JSX.Element;
    formatValue(value: string[], options: any, props: FieldProps): string | null;
}
export interface MediaArrayState {
    tmpMedias: number[];
    addModal?: any;
    dragging?: boolean;
    metadataModalOpen?: number | false;
    modalIdx?: number;
    modalMediaSrc?: string;
    modalMetadata?: any;
    metadataSaveSuccess?: string | false;
    metadataForm?: any;
    alert?: boolean;
    alertMsg?: string;
}
type Constructor<LFC> = new (...args: any[]) => LFC;
export declare function MediaArrayField<LFC extends Constructor<React.Component<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>, MediaArrayState>>>(ComposedComponent: LFC): {
    new (...args: any[]): {
        ALLOWED_FILE_TYPES: string[];
        ACCEPT_FILE_TYPES: string[];
        MAX_FILE_SIZE: number;
        KEY: string;
        ENDPOINT: string;
        GLYPH: string;
        TRANSLATION_TAKE_NEW: string;
        TRANSLATION_SELECT_FILE: string;
        TRANSLATION_NO_MEDIA: string;
        CONTAINER_CLASS: string;
        METADATA_FORM_ID: string;
        deprecatedOptions: {
            imageAddModal: string;
            autoOpenImageAddModal: string;
        };
        apiClient: ApiClient;
        _context: any;
        mounted: boolean;
        fetching: any;
        addMediaContainerRef: React.RefObject<HTMLInputElement>;
        getOptions: (uiSchema: any) => any;
        componentDidMount(): void;
        componentWillUnmount(): void;
        onDragEnter: () => void;
        onDragLeave: () => void;
        onDrop: (files: File[]) => void;
        defaultOnClick: () => void;
        render(): JSX.Element;
        onKeyDown: (e: (KeyboardEvent | React.KeyboardEvent)) => void;
        renderMedias: () => any;
        renderLoadingMedias: () => (JSX.Element | null)[];
        openModalFor: (i: number) => () => void;
        onMediaRmClick: (i: number) => () => void;
        hideMetadataModal: () => void;
        onMetadataFormChange: (formData: any) => void;
        renderMetadataModal: () => JSX.Element | null;
        onHideMediaAddModal: () => void;
        renderMediaAddModal: () => JSX.Element | null;
        onAlertOk: () => void;
        parseExif: (files: File[]) => Promise<ProcessedExifData>;
        sideEffects: (formData: any) => void;
        onFileFormChange: (files: File[]) => void;
        getContainerId: () => number | "root";
        saveMedias(files: File[], exifDataPromise: Promise<ProcessedExifData>): Promise<any[] | undefined>;
        addNameToDataURL: (dataURL: string, name: string) => string;
        processFiles: (files: File[]) => Promise<ProcessedFile[]>;
        processFile: (file: File) => Promise<ProcessedFile>;
        onMediaMetadataUpdate: ({ formData }: {
            formData: any;
        }) => Promise<void>;
        getMetadataPromise: (exifDataPromise: Promise<ProcessedExifData>) => Promise<MediaMetadataSchema>;
        getMaxFileSizeAsString: () => string;
        getAllowedMediaFormatsTranslationKey: () => "AllowedFileFormat" | "AllowedFileFormats";
        getAllowedMediaFormatsAsString: () => string;
        context: any;
        setState<K extends keyof MediaArrayState>(state: MediaArrayState | ((prevState: Readonly<MediaArrayState>, props: Readonly<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>>) => MediaArrayState | Pick<MediaArrayState, K> | null) | Pick<MediaArrayState, K> | null, callback?: (() => void) | undefined): void;
        forceUpdate(callback?: (() => void) | undefined): void;
        readonly props: Readonly<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>> & Readonly<{
            children?: React.ReactNode;
        }>;
        state: Readonly<MediaArrayState>;
        refs: {
            [key: string]: React.ReactInstance;
        };
        shouldComponentUpdate?(nextProps: Readonly<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>>, nextState: Readonly<MediaArrayState>, nextContext: any): boolean;
        componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
        getSnapshotBeforeUpdate?(prevProps: Readonly<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>>, prevState: Readonly<MediaArrayState>): any;
        componentDidUpdate?(prevProps: Readonly<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>>, prevState: Readonly<MediaArrayState>, snapshot?: any): void;
        componentWillMount?(): void;
        UNSAFE_componentWillMount?(): void;
        componentWillReceiveProps?(nextProps: Readonly<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>>, nextContext: any): void;
        UNSAFE_componentWillReceiveProps?(nextProps: Readonly<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>>, nextContext: any): void;
        componentWillUpdate?(nextProps: Readonly<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>>, nextState: Readonly<MediaArrayState>, nextContext: any): void;
        UNSAFE_componentWillUpdate?(nextProps: Readonly<FieldProps<any, JSONSchemaArray<JSONSchemaObject>>>, nextState: Readonly<MediaArrayState>, nextContext: any): void;
    };
    contextType: React.Context<import("../../ReactContext").ContextProps>;
    propTypes: {
        uiSchema: PropTypes.Requireable<PropTypes.InferProps<{
            "ui:options": PropTypes.Requireable<PropTypes.InferProps<{
                titleClassName: PropTypes.Requireable<string>;
                addModal: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
                    labels: PropTypes.Requireable<PropTypes.InferProps<{
                        cancel: PropTypes.Requireable<string>;
                    }>>;
                }> | null | undefined>>;
                autoOpenAddModal: PropTypes.Requireable<boolean>;
                autoOpenMetadataModal: PropTypes.Requireable<boolean>;
                sideEffects: PropTypes.Requireable<object>;
                exifParsers: PropTypes.Requireable<(object | null | undefined)[]>;
                metadataFormId: PropTypes.Requireable<string>;
                hideDeleteButton: PropTypes.Requireable<boolean>;
                deleteConfirmPlacement: PropTypes.Requireable<string>;
            }>>;
        }>>;
        schema: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
            type: PropTypes.Requireable<string>;
            items: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
                type: PropTypes.Validator<string>;
            }>>>;
        }>>>;
        formData: PropTypes.Requireable<any[]>;
    };
    displayName: string;
} & LFC;
interface ThumbnailProps {
    id?: string;
    apiClient: ApiClient;
    apiEndpoint?: string;
    dataURL?: string;
    loading?: boolean;
    downloadLink?: boolean;
}
interface ThumbnailState {
    url?: string;
    linkUrl?: string;
}
export declare class Thumbnail extends React.PureComponent<ThumbnailProps, ThumbnailState> {
    mounted: boolean;
    constructor(props: ThumbnailProps);
    componentDidMount(): void;
    componentWillUnmount(): void;
    UNSAFE_componentWillReceiveProps(props: ThumbnailProps): void;
    updateURL: ({ id, apiClient, apiEndpoint }: ThumbnailProps) => Promise<void>;
    render(): JSX.Element | null;
}
export {};
