/** * Documentation Engine for Intaleq Dashboard * Comprehensive API Reference (EN/AR) * Updated with Premium Visuals, High-Performance Examples, and Official SDKs */ const docs = { init: () => { console.log('📚 Intaleq Documentation Module Init'); docs.bindEvents(); // Initial render based on existing active links or default const activeLink = document.querySelector('.docs-nav-link.active'); const section = activeLink ? activeLink.getAttribute('data-section') : 'getting-started'; docs.renderSection(section); }, bindEvents: () => { document.querySelectorAll('.docs-nav-link').forEach(link => { link.addEventListener('click', (e) => { e.preventDefault(); const section = e.currentTarget.getAttribute('data-section'); docs.renderSection(section); // Active state management document.querySelectorAll('.docs-nav-link').forEach(l => l.classList.remove('active', 'bg-blue-500/10', 'text-blue-400')); e.currentTarget.classList.add('active', 'bg-blue-500/10', 'text-blue-400'); }); }); }, renderSection: (id) => { const container = document.getElementById('docs-content'); if (!container) return; const lang = i18n.currentLang || 'en'; const isAr = lang === 'ar'; const content = { 'getting-started': `
`, 'sdks': ` `, 'tiles-api': ` `, 'geocoding-api': ` `, 'routing-api': ` ` }; container.innerHTML = content[id] || '