/**
 * Telegram bots route. Delegates to:
 *   /telegram             \u2192 TelegramBotsList  (super_admin sees the tenant picker)
 *   /telegram/:id         \u2192 TelegramBotsList  (filtered to that tenant)
 *   /telegram/:id/:bid    \u2192 TelegramBotDetailPage
 *
 * Sub-routes are nested so the sidebar Telegram link keeps its
 * active state on both the list and the detail page.
 *
 * M13b W3 ships super_admin-only scope. W4 (or v1.1) can
 * loosen to per-tenant tenant_admin.
 */

import { Route, Routes } from 'react-router-dom';
import { TelegramBotsList } from '@/features/telegram/list';
import { TelegramBotDetailPage } from '@/features/telegram/detail-page';

export function TelegramRoute() {
  return (
    <Routes>
      <Route index element={<TelegramBotsList />} />
      <Route path=":id" element={<TelegramBotsList />} />
      <Route path=":id/:bid" element={<TelegramBotDetailPage />} />
    </Routes>
  );
}
