/** * Extract files from a file input change event * * @param event - The file input change event * * @returns The files from the event */ export declare function getFilesFromEvent(event: React.ChangeEvent): File[]; /** * Format file size in human-readable format * * @param bytes - The size in bytes * * @returns The formatted file size */ export declare function formatFileSize(bytes: number): string; /** * Get file extension from filename * * @param filename - The name of the file * * @returns The file extension including the dot */ export declare function getFileExtension(filename: string): string; /** * Check if file matches a MIME type pattern * * @param file - The file to check * * @param pattern - The MIME type pattern * * @returns True if the file matches the pattern */ export declare function matchesMimeType(file: File, pattern: string): boolean; /** * Check if file has specific extension * * @param file - The file to check * * @param extension - The extension to check * * @returns True if the file has the extension */ export declare function hasExtension(file: File, extension: string): boolean; /** * Get total size of multiple files * * @param files - The files to get the total size of * * @returns The total size of the files */ export declare function getTotalFileSize(files: File[]): number; /** * Simple validation result type * * @property isValid - Whether the file is valid * * @property error - The error message */ export type FileValidationResult = { isValid: boolean; error?: string; }; /** * Helper to create validation results * * @param isValid - Whether the file is valid * * @param error - The error message * * @returns The validation result */ export declare function createValidationResult(isValid: boolean, error?: string): FileValidationResult; /** * Common file type groups * * @property IMAGES - The image file types * * @property DOCUMENTS - The document file types * * @property ARCHIVES - The archive file types */ export declare const FILE_TYPES: { readonly IMAGES: readonly ["image/jpeg", "image/png", "image/gif", "image/webp", "image/svg+xml"]; readonly DOCUMENTS: readonly ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "text/plain"]; readonly ARCHIVES: readonly ["application/zip", "application/x-rar-compressed", "application/x-tar"]; };