function showAlert(message, type) { const alertContainer = document.getElementById('alertContainer'); // Create the alert element const alertElement = document.createElement('div'); alertElement.classList.add('text-white', 'rounded-lg', 'px-4', 'py-3', 'w-80'); if (type === 'success') { alertElement.classList.add('bg-success'); } else if (type === 'error') { alertElement.classList.add('bg-error'); } else { alertElement.classList.add('bg-warning'); } alertElement.textContent = message; alertContainer.appendChild(alertElement); // Set timeout to remove the alert after 3 seconds setTimeout(() => { alertElement.remove(); }, 3000); } function validateFileSize(file) { const maxTotalFileSize = 10 * 1024 * 1024; // 10 MB return file.size >= maxTotalFileSize; } // Export the function to make it accessible in other files // export { showAlert };