import type { ICancelEventDetail, IEventDetail } from '@breadstone/mosaik-elements'; import type { IFileInfo } from '../Components/Inputs/FileUpload/Models/Interfaces/IFileInfo'; /** * Represents the event detail for files picked events. * * @public */ export interface IFilesPickedEventDetail extends IEventDetail { /** * The files associated with this event. */ readonly files: FileList; } /** * Event fired when files are picked. * * @public */ export type FilesPickedEvent = CustomEvent; /** * Represents the event detail for file add events. * * @public */ export interface IFileAddEventDetail extends ICancelEventDetail { /** * The file info being added. */ readonly file: IFileInfo; } /** * Event fired when a file is added. * * @public */ export type FileAddEvent = CustomEvent; /** * Represents the event detail for file remove events. * * @public */ export interface IFileRemoveEventDetail extends ICancelEventDetail { /** * The file info being removed. */ readonly file: IFileInfo; } /** * Event fired when a file is removed. * * @public */ export type FileRemoveEvent = CustomEvent; /** * Represents the event detail for file cancel events. * * @public */ export interface IFileCancelEventDetail extends ICancelEventDetail { /** * The file info being cancelled. */ readonly file: IFileInfo; } /** * Event fired when a file upload is cancelled. * * @public */ export type FileCancelEvent = CustomEvent; /** * Represents the event detail for file change events. * * @public */ export interface IFileChangeEventDetail extends IEventDetail { /** * The file info. */ readonly file: IFileInfo; /** * The upload progress (0-100). */ readonly progress: number; } /** * Event fired when file upload progress changes. * * @public */ export type FileChangeEvent = CustomEvent; /** * Represents the event detail for files changed events (when the files array changes). * * @public */ export interface IFilesChangedEventDetail extends IEventDetail { /** * The current list of files. */ readonly files: Array; } /** * Event fired when the files array changes. * * @public */ export type FilesChangedEvent = CustomEvent; /** * Represents the event detail for file error events. * * @public */ export interface IFileErrorEventDetail extends IEventDetail { /** * The file info. */ readonly file: IFileInfo; /** * The error that occurred. */ readonly error: Error; } /** * Event fired when a file upload error occurs. * * @public */ export type FileErrorEvent = CustomEvent; declare global { interface HTMLElementEventMap { filesPicked: FilesPickedEvent; filesChanged: FilesChangedEvent; fileAdd: FileAddEvent; fileRemove: FileRemoveEvent; fileCancel: FileCancelEvent; fileChange: FileChangeEvent; fileError: FileErrorEvent; fileAdded: FileAddEvent; fileRemoved: FileRemoveEvent; fileFailed: FileErrorEvent; } } //# sourceMappingURL=FileEvents.d.ts.map