import { ReactNode } from 'react';
export interface FileRejection {
file: File;
reason: "type" | "size";
}
export interface DropzoneProps {
/** Fires with the accepted files whenever a selection is made (click or drop). */
onFilesSelected: (files: File[]) => void;
/** Native `accept` string, also used to filter dropped files (extensions and/or mime, incl. `image/*`). */
accept?: string;
/** Allow selecting more than one file. Default `false`. */
multiple?: boolean;
/** Max size in bytes; larger files are rejected via {@link onReject}. */
maxSize?: number;
/** Fires with files rejected by `accept` / `maxSize`. */
onReject?: (rejections: FileRejection[]) => void;
/** Inert + dimmed; click / drop / keyboard are disabled. */
disabled?: boolean;
/** Controlled selected file(s) — renders a preview card when `showPreview`. */
value?: File | File[] | null;
/** Show the built-in preview card(s). Defaults to `true` when `value` is provided. */
showPreview?: boolean;
/** Preview remove handler. Falls back to `onFilesSelected([])` when omitted. */
onRemove?: (file: File) => void;
/** Custom preview renderer — replaces the built-in card(s) (e.g. spreadsheet icon + extension badge). Receives the files and a `remove` callback. */
renderPreview?: (files: File[], remove: (file: File) => void) => ReactNode;
/** aria-label for the built-in preview's remove button. Default `"Kaldır"`. */
removeLabel?: string;
/** Leading icon in the empty zone. Default ``. */
icon?: ReactNode;
/** Primary text in the empty zone. */
title?: ReactNode;
/** Secondary muted text (e.g. accepted types / max size). */
hint?: ReactNode;
/** Error message rendered under the zone. */
error?: ReactNode;
/** Custom empty-zone body (replaces icon/title/hint). */
children?: ReactNode;
className?: string;
id?: string;
"aria-label"?: string;
}
/**
* Dropzone — unified file drop area for both consumers.
*
* Drop-in for HES `FileDropZone` / `FirmwareFormPanel` and MDM
* `CoefficientUploadPanel`: dashed click/drag zone with keyboard activation,
* a drag-over state, optional `accept` / `maxSize` validation (rejects surface
* via `onReject`, so the i18n message stays consumer-owned), a controlled
* selected-file preview card with a remove button, and an `error` slot. The
* button-triggered upload flavour (MDM `FileUploadButton`) stays a trivial
* `Button` + `Progress` composition and is intentionally out of scope here.
*/
export declare const Dropzone: import('react').ForwardRefExoticComponent>;
//# sourceMappingURL=Dropzone.d.ts.map