// TradeFlow Sidebar Component class TFSidebar extends HTMLElement { constructor() { super(); this.currentPage = this.getCurrentPage(); } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); } getCurrentPage() { const path = window.location.pathname; if (path.includes('exchanges')) return 'exchanges'; if (path.includes('strategies')) return 'strategies'; if (path.includes('logs')) return 'logs'; if (path.includes('settings')) return 'settings'; return 'dashboard'; } render() { const navItems = [ { id: 'dashboard', label: 'Dashboard', icon: 'layout', href: 'index.html' }, { id: 'exchanges', label: 'Exchanges', icon: 'server', href: 'exchanges.html' }, { id: 'strategies', label: 'Strategies', icon: 'code', href: 'strategies.html' }, { id: 'logs', label: 'Signal Logs', icon: 'activity', href: 'logs.html' }, { id: 'settings', label: 'Settings', icon: 'settings', href: 'settings.html' } ]; this.shadowRoot.innerHTML = `
`; } } customElements.define('tf-sidebar', TFSidebar);