import { type DecisionFunction, type MimeTypeWithSubtypeWildcardWithoutParameters, type MimeTypeWithoutParameters, type SlashPathTypedFileSuffix, type MimeTypeWildcard } from '@dereekb/util';
/**
 * String used as input for the "accept" attribute of a file input element.
 */
export type FileAcceptString = string;
/**
 * Returns a string that can be used as the "accept" attribute of a file input element.
 *
 * @param accept
 * @returns
 */
export declare function fileAcceptString(accept: FileAcceptString | FileAcceptFilterTypeStringArray): FileAcceptString;
/**
 * A string that describes a type of file that can be selected.
 *
 * Can either be a mime type or a file suffix.
 */
export type FileAcceptFilterTypeString = MimeTypeWildcard | MimeTypeWithoutParameters | MimeTypeWithSubtypeWildcardWithoutParameters | SlashPathTypedFileSuffix;
/**
 * An array of file accept filter type strings.
 */
export type FileAcceptFilterTypeStringArray = FileAcceptFilterTypeString[];
export declare function fileAcceptFilterTypeStringArray(accept: FileAcceptString | FileAcceptFilterTypeStringArray): FileAcceptFilterTypeStringArray;
export interface FileArrayAcceptMatchConfig {
    readonly accept: FileAcceptFunction | FileAcceptString | FileAcceptFilterTypeStringArray;
    /**
     * If false, then only the first file will be accepted.
     *
     * Defaults to true.
     */
    readonly multiple?: boolean;
}
export interface FileArrayAcceptMatchResult {
    /**
     * If multiple is allowed or not.
     */
    readonly multiple: boolean;
    /**
     * The input files.
     */
    readonly input: File[];
    /**
     * The final list of accepted files.
     */
    readonly accepted: File[];
    /**
     * The final list of rejected files.
     */
    readonly rejected: File[];
    /**
     * The list of accepted files based on the file type.
     *
     * If multiple is false, all files that would have been accepted are included here.
     */
    readonly acceptedType: File[];
    /**
     * The list of rejected files based on the file type.
     *
     * If multiple is false, only files that would have been rejected by type are included here.
     */
    readonly rejectedType: File[];
}
/**
 * A function that matches an array of files based on the internal configuration.
 */
export type FileArrayAcceptMatchFunction = (input: File[]) => FileArrayAcceptMatchResult;
/**
 * Creates a FileArrayAcceptMatchFunction from the input.
 */
export declare function fileArrayAcceptMatchFunction(config: FileArrayAcceptMatchConfig): FileArrayAcceptMatchFunction;
/**
 * Type of input used for a FileAcceptFunction.
 *
 * Isolates the name and type fields from a File.
 */
export type FileAcceptFunctionInput = Pick<File, 'name' | 'type'>;
/**
 * Used to determine if a file is an accepted type based on the internal configuration.
 */
export type FileAcceptFunction = DecisionFunction<FileAcceptFunctionInput>;
/**
 * Creates a FileAcceptFunction from the input.
 *
 * @param accept
 * @returns
 */
export declare function fileAcceptFunction(accept: FileAcceptString | FileAcceptFilterTypeStringArray): FileAcceptFunction;
