/**
* Toast notification system
*/
/**
* Show toast notification
* @param {string} message - Message to display
* @param {string} type - Type of notification (success, error, info)
*/
export function showNotification(message, type = 'info') {
const container = document.getElementById('toastContainer');
// Create toast element
const toast = document.createElement('div');
toast.className = `toast toast-${type}`;
// Icon based on type
const icons = {
success: '✓',
error: '✕',
info: 'ℹ'
};
toast.innerHTML = `
${icons[type] || 'ℹ'}
${message}
`;
container.appendChild(toast);
// Auto-remove after 3 seconds
setTimeout(() => {
toast.classList.add('hiding');
setTimeout(() => {
container.removeChild(toast);
}, 300);
}, 3000);
}