/** * Loading States Component * Provides loading spinners and skeleton screens */ export class Loading { /** * Show loading spinner in container */ static show(containerId, message = 'Loading...') { const container = document.getElementById(containerId); if (!container) { console.warn(`[Loading] Container not found: ${containerId}`); return; } const spinner = document.createElement('div'); spinner.className = 'loading-container'; spinner.innerHTML = `
${message}
`; container.innerHTML = ''; container.appendChild(spinner); } /** * Hide loading spinner */ static hide(containerId) { const container = document.getElementById(containerId); if (!container) return; const spinner = container.querySelector('.loading-container'); if (spinner) { spinner.remove(); } } /** * Generate skeleton rows for tables */ static skeletonRows(count = 5, columns = 5) { let html = ''; for (let i = 0; i < count; i++) { html += '