import React from "react";
import { type CategoryProps } from "./ImageCategory";
export interface TargetProps {
target: {
name: string | null | undefined;
/**
* It is called imageData, but it can any file that was selected. The name is kept for backwards compatibility for now.
*/
value: string | null | undefined | {
imageData: FormData;
};
};
}
export interface ImagePickerProps {
name: string;
images: string[];
categories: CategoryProps[];
preselectedImage?: string;
preselectedMediaType?: "image" | "video";
/**
* Array of [valid MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types).
*
* If the media the user tries to upload doesn't match one of the
* MIME types in this array, an error message will be displayed in
* the UI.
*
* @example
* ```tsx
*
* ```
*/
acceptedMimeTypes?: string[];
/**
* Maximum file size allowed to be uploaded in MB. If undefined, a default limit of 100mb is applied.
*/
maxFileSize?: number;
clearImageIndex?: number;
type?: "normal" | "compact";
isDisabled?: boolean;
handleChange: (target: TargetProps) => void;
isUploadButtonVisible?: boolean;
isClearButtonVisible?: boolean;
isUploading?: boolean;
isErrorUploading?: boolean;
localisation: Partial>;
}
export declare const ImagePickerInner: React.FC;
}>;
export interface MediaPickerProps {
name: string;
media: string[];
categories: CategoryProps[];
/**
* If you add preselectedMedia you must also specify preselectedMediaType, especially if it is not an image.
*
* @example
* ```tsx
*
* ```
*/
preselectedMedia?: string;
preselectedMediaType?: "image" | "video";
clearIndex?: number;
type?: "normal" | "compact";
/**
* Array of [valid MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types).
*
* If the media the user tries to upload doesn't match one of the
* MIME types in this array, an error message will be displayed in
* the UI.
*
* @example
* ```tsx
*
* ```
*/
acceptedMimeTypes?: string[];
/**
* Maximum file size allowed to be uploaded in MB. If undefined, a default limit of 100mb is applied.
*/
maxFileSize?: number;
isDisabled?: boolean;
onChange: (target: TargetProps) => void;
isUploadButtonVisible?: boolean;
isClearButtonVisible?: boolean;
isUploading?: boolean;
isErrorUploading?: boolean;
localisation: Partial>;
}
export declare const MediaPicker: React.ForwardRefExoticComponent>;