/** * Main App component — routes based on WordPress submenu slug. * * WordPress sidebar: Dashboard, Email Marketing, Content Generator, * Social Media, Chatbot, Settings. * * Each module page has its own internal sidebar for sub-navigation. */ import { __ } from '@wordpress/i18n'; import AppLayout from './components/Layout/AppLayout'; import OverviewPage from './components/modules/Overview/OverviewPage'; import EmailMarketingPage from './components/modules/EmailMarketing/EmailMarketingPage'; import ContentGeneratorPage from './components/modules/ContentGenerator/ContentGeneratorPage'; import SocialMediaPage from './components/modules/SocialMedia/SocialMediaPage'; import SeoPage from './components/modules/Seo/SeoPage'; import ChatbotPage from './components/modules/Chatbot/ChatbotPage'; import WorkflowAutomationPage from './components/modules/WorkflowAutomation/WorkflowAutomationPage'; import AiProvidersPage from './components/modules/Settings/AiProvidersPage'; import SettingsPage from './components/modules/Settings/SettingsPage'; const App = () => { const currentPage = window.aimeData?.currentPage || 'ai-marketing-expert'; // ── Dashboard ──────────────────────────────────────────── if ( currentPage === 'ai-marketing-expert' ) { return ( ); } // ── Email Marketing (with internal sidebar) ────────────── if ( currentPage === 'ai-marketing-expert-email' ) { return ; } // ── Content Generator (with internal sidebar) ─────────── if ( currentPage === 'ai-marketing-expert-content' ) { return ; } // ── Social Media (with internal sidebar) ───────────────── if ( currentPage === 'ai-marketing-expert-social' ) { return ; } // ── SEO (with internal sidebar) ────────────────────────── if ( currentPage === 'ai-marketing-expert-seo' ) { return ; } // ── Chatbot (with internal sidebar) ───────────────────── if ( currentPage === 'ai-marketing-expert-chatbot' ) { return ; } // ── Workflow Automation (with internal sidebar) ───────── if ( currentPage === 'ai-marketing-expert-workflow-automation' ) { return ; } // ── AI Providers ───────────────────────────────────────── if ( currentPage === 'ai-marketing-expert-ai-providers' ) { return ( ); } // ── Settings ───────────────────────────────────────────── if ( currentPage === 'ai-marketing-expert-settings' ) { return ( ); } // ── Fallback to Dashboard ──────────────────────────────── return ( ); }; export default App;