import { escapeHtml } from './dom.js'; // ==================== Toast ==================== export function showToast(msg, type = 'info') { const container = document.getElementById('toast-container'); const toast = document.createElement('div'); const icons = { info: 'fa-info-circle', success: 'fa-check-circle', error: 'fa-times-circle', warning: 'fa-exclamation-triangle' }; toast.className = `toast ${type}`; toast.innerHTML = `${escapeHtml(msg)}`; container.appendChild(toast); setTimeout(() => { toast.classList.add('hiding'); setTimeout(() => toast.remove(), 300); }, 3000); }