import { Routes, Route, Navigate } from 'react-router-dom';
import SuperAdminLayout from './SuperAdminLayout';
import PlatformDashboard from './PlatformDashboard';
import OrganizationsManager from './OrganizationsManager';
import UsersManager from './UsersManager';
import WhatsAppNumbers from './WhatsAppNumbers';
import MonitoringAlerts from './MonitoringAlerts';
import BillingManager from './BillingManager';
import AIInsights from './AIInsights';
import AuditLogs from './AuditLogs';
import WhatsAppTemplates from './WhatsAppTemplates';
import WhatsAppProfiles from './WhatsAppProfiles';

export default function SuperAdminRouter() {
    return (
        <Routes>
            <Route path="/*" element={<SuperAdminLayout />}>
                <Route index element={<Navigate to="/platform/dashboard" replace />} />
                <Route path="platform/dashboard" element={<PlatformDashboard />} />
                <Route path="platform/organizations" element={<OrganizationsManager />} />
                <Route path="platform/users" element={<UsersManager />} />
                <Route path="platform/whatsapp" element={<WhatsAppNumbers />} />
                <Route path="platform/whatsapp/templates" element={<WhatsAppTemplates />} />
                <Route path="platform/whatsapp/profiles" element={<WhatsAppProfiles />} />
                <Route path="platform/monitoring" element={<MonitoringAlerts />} />
                <Route path="platform/billing" element={<BillingManager />} />
                <Route path="platform/ai" element={<AIInsights />} />
                <Route path="platform/audit-logs" element={<AuditLogs />} />
                <Route path="*" element={<Navigate to="/platform/dashboard" replace />} />
            </Route>
        </Routes>
    );
}
