import { DownloadItem, DownloadProgress } from './interfaces'; declare class Controller { private events; private consoleLog; /** * Initializes the `Controller` instance with an optional flag to enable logging. * @param displayLog Flag indicating whether to display log messages. Default is false. */ constructor(displayLog?: boolean); /** * Emits the progress event with the given progress object. * @param progress The progress object to emit. */ private emitProgress; /** * Ensures that the directory and file exist in the given DownloadItem. * @param item The DownloadItem object. * @returns The updated DownloadItem object. * @throws Error if the file name is not found. */ private ensureDirFile; /** * Downloads a file from the given URL specified in the DownloadItem object. * @param item The DownloadItem object. * @returns A promise that resolves when the download is completed. * @throws Error if an error occurs during the download. */ downloadFile(item: DownloadItem): Promise; onProgress(callback: (progress: DownloadProgress) => void): void; } export { Controller };