import { AttachedFile } from './types'; import { MenuItemType } from '../Menu/types'; /** * Determine the file type from a File object */ export declare const getFileType: (file: File) => AttachedFile["type"]; /** * Create menu items for overflow files */ export declare const createOverflowMenuItems: (hiddenFiles: AttachedFile[], onFileRemove: (fileId: string) => void, onFileClick: (file: AttachedFile) => void) => MenuItemType[]; /** * Handle textarea auto-resize functionality */ export declare const handleAutoResize: (element: HTMLTextAreaElement | null, autoResize: boolean) => void; /** * Validate message length against maxLength */ export declare const isValidMessageLength: (message: string, maxLength?: number) => boolean; /** * Convert File objects to AttachedFile objects */ export declare const convertFilesToAttachedFiles: (files: File[]) => AttachedFile[]; /** * Filter out duplicate files by comparing name and size with existing attached files * @param files - Array of File objects to check * @param attachedFiles - Array of already attached files * @returns Object containing newFiles (non-duplicates) and duplicateFiles (array of duplicate file names) */ export declare const filterDuplicateFiles: (files: File[], attachedFiles: AttachedFile[]) => { newFiles: File[]; duplicateFiles: string[]; }; /** * Simple utility to truncate placeholder text if it exceeds the textarea's available width * Uses canvas to measure text width and truncates with ellipsis if needed */ export declare const truncatePlaceholder: (textarea: HTMLTextAreaElement | null, placeholder: string | undefined) => string | undefined;