import { AccessibilityProps } from '../shared/index.js';

type FileStatus = 'pending' | 'uploading' | 'complete' | 'error';
interface FileEntry {
    /** Unique ID for this file entry */
    id: string;
    /** Original file name */
    name: string;
    /** File size in bytes */
    size: number;
    /** MIME type */
    type: string;
    /** Upload progress 0-100 */
    progress: number;
    /** Current status */
    status: FileStatus;
    /** Error message if status is 'error' */
    error?: string;
}
interface FileUploadProps {
    /** Accepted file types (e.g., 'image/*,.pdf') */
    accept?: string;
    /** Max file size in bytes */
    maxSize?: number;
    /** Max number of files */
    maxFiles?: number;
    /** Allow multiple file selection */
    multiple?: boolean;
    /** Callback when files are selected/added */
    onFilesSelected?: (files: FileEntry[]) => void;
    /** Callback when a validation error occurs */
    onError?: (errors: FileUploadError[]) => void;
}
interface FileUploadError {
    file: string;
    code: 'type' | 'size' | 'count';
    message: string;
}
interface FileUploadState {
    files: FileEntry[];
    isDragging: boolean;
}
interface FileUploadAPI {
    /** Current state */
    state: FileUploadState;
    /** Add files (validates type, size, count) */
    addFiles(files: Array<{
        name: string;
        size: number;
        type: string;
    }>): void;
    /** Remove a file by ID */
    removeFile(id: string): void;
    /** Update a file's progress */
    updateProgress(id: string, progress: number): void;
    /** Set a file's status */
    setStatus(id: string, status: FileStatus, error?: string): void;
    /** ARIA props for the drop zone */
    dropZoneProps: Partial<AccessibilityProps> & Record<string, unknown>;
    /** ARIA props for the file input */
    inputProps: Record<string, unknown>;
    /** Drag event handlers (for headless use) */
    dragHandlers: {
        onDragEnter(): void;
        onDragLeave(): void;
        onDragOver(): void;
        onDrop(): void;
    };
    /** Generated IDs */
    ids: {
        dropZone: string;
        input: string;
        label: string;
        fileList: string;
    };
}
declare function formatFileSize(bytes: number): string;
declare function createFileUpload(props?: FileUploadProps): FileUploadAPI;

declare const fileUploadDropZoneVariants: (props?: ({
    state?: "idle" | "dragging" | "disabled" | undefined;
} & {
    className?: string;
}) | undefined) => string;
declare const fileUploadFileListStyles = "mt-4 space-y-2";
declare const fileUploadFileItemStyles = "flex items-center gap-3 rounded-md border p-3 text-sm";
declare const fileUploadProgressStyles = "h-1.5 w-full rounded-full bg-secondary overflow-hidden";
declare const fileUploadProgressBarStyles = "h-full rounded-full bg-primary transition-all duration-300";
declare const fileUploadRemoveButtonStyles = "ml-auto text-muted-foreground hover:text-foreground cursor-pointer";

export { type FileEntry, type FileStatus, type FileUploadAPI, type FileUploadError, type FileUploadProps, type FileUploadState, createFileUpload, fileUploadDropZoneVariants, fileUploadFileItemStyles, fileUploadFileListStyles, fileUploadProgressBarStyles, fileUploadProgressStyles, fileUploadRemoveButtonStyles, formatFileSize };
