/** * ProgressManager - Manages progress display and feedback */ class ProgressManager { constructor(progressContainer, progressText, progressCount) { this.progressContainer = progressContainer; this.progressText = progressText; this.progressCount = progressCount; } /** * Show progress indicator * @param {string} message - Progress message */ showProgress(message = 'Scanning directory...') { if (this.progressContainer) { this.progressContainer.style.display = 'block'; this.progressText.textContent = message; this.progressCount.textContent = ''; } } /** * Hide progress indicator */ hideProgress() { if (this.progressContainer) { this.progressContainer.style.display = 'none'; } } /** * Update progress with current/total counts * @param {number} current - Current count * @param {number} total - Total count * @param {string} fileName - Current file name */ updateProgress(current, total, fileName) { if (this.progressContainer) { const displayCurrent = current + 1; this.progressText.textContent = `Processing: ${fileName}`; this.progressCount.textContent = `${displayCurrent} of ${total} files`; } } /** * Update progress with custom text * @param {string} text - Progress text */ updateProgressText(text) { if (this.progressText) { this.progressText.textContent = text; } } /** * Update progress count display * @param {number} current - Current count * @param {number} total - Total count */ updateProgressCount(current, total) { if (this.progressCount) { const displayCurrent = current + 1; this.progressCount.textContent = `${displayCurrent} of ${total} files`; } } /** * Show directory feedback * @param {string} folderName - Folder name */ showDirectoryFeedback(folderName) { console.log(`Directory "${folderName}" created and file moved`); } } module.exports = ProgressManager;