/** * Tab Management - Switch between different views */ /** * Switch between tabs */ export function switchTab(tabName) { document.querySelectorAll('.tab-button').forEach(btn => btn.classList.remove('active')); document.querySelectorAll('.tab-content').forEach(content => content.classList.remove('active')); const tabButton = document.querySelector(`[data-tab="${tabName}"]`); const tabContent = document.getElementById(tabName); if (tabButton) tabButton.classList.add('active'); if (tabContent) tabContent.classList.add('active'); } /** * Setup tab event listeners */ export function setupTabListeners() { document.querySelectorAll('.tab-button').forEach(button => { button.addEventListener('click', () => switchTab(button.dataset.tab)); }); }