import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';

const sidebars: SidebarsConfig = {
  docsSidebar: [
    'intro',
    'getting-started',
    {
      type: 'category',
      label: 'Features',
      collapsed: false,
      items: [
        'features/project-detection',
        'features/process-management',
        'features/reverse-proxy',
        'features/frontend-diagnostics',
      ],
    },
    {
      type: 'category',
      label: 'Concepts',
      items: [
        'concepts/architecture',
        'concepts/lock-free-design',
        'concepts/graceful-shutdown',
      ],
    },
  ],
  apiSidebar: [
    {
      type: 'category',
      label: 'MCP Tools',
      collapsed: false,
      items: [
        'api/detect',
        'api/run',
        'api/proc',
        'api/proxy',
        'api/proxylog',
        'api/currentpage',
        'api/get_errors',
        'api/get_incidents',
        'api/responsive_audit',
        'api/api_audit',
        'api/loading_audit',
        'api/snapshot',
        'api/tunnel',
        'api/daemon',
        'api/watch',
        'api/channel_reply',
      ],
    },
    {
      type: 'category',
      label: 'Frontend API',
      collapsed: false,
      items: [
        'api/frontend/overview',
        {
          type: 'category',
          label: 'Core Primitives',
          collapsed: true,
          items: [
            'api/frontend/element-inspection',
            'api/frontend/tree-walking',
            'api/frontend/visual-state',
            'api/frontend/layout-diagnostics',
            'api/frontend/visual-overlays',
            'api/frontend/interactive',
            'api/frontend/state-capture',
            'api/frontend/accessibility',
            'api/frontend/composite',
          ],
        },
        {
          type: 'category',
          label: 'Quality & Performance',
          collapsed: true,
          items: [
            'api/frontend/layout-robustness',
            'api/frontend/quality-auditing',
          ],
        },
        {
          type: 'category',
          label: 'Interactive Modes',
          collapsed: true,
          items: [
            'api/frontend/indicator',
            'api/frontend/sketch-mode',
            'api/frontend/design-mode',
            'api/frontend/responsive-mode',
          ],
        },
        {
          type: 'category',
          label: 'CSS & Security',
          collapsed: true,
          items: [
            'api/frontend/css-evaluation',
            'api/frontend/security-validation',
          ],
        },
      ],
    },
  ],
  useCasesSidebar: [
    {
      type: 'category',
      label: 'Real-World Use Cases',
      collapsed: false,
      items: [
        'use-cases/debugging-web-apps',
        'use-cases/automated-testing',
        'use-cases/mobile-testing',
        'use-cases/performance-monitoring',
        'use-cases/ci-cd-integration',
        'use-cases/accessibility-auditing',
        'use-cases/frontend-error-tracking',
        'guides/debug-browser-errors-ai',
        'guides/frontend-error-tracking-realtime',
        'guides/chaos-engineering-frontend',
        'guides/accessibility-auditing-ai',
        'guides/css-layout-debugging-ai',
        'guides/visual-regression-testing-ai',
        'guides/responsive-design-testing-ai',
        'guides/mobile-testing-real-devices-ai',
        'guides/frontend-performance-monitoring-ai',
      ],
    },
    {
      type: 'category',
      label: 'Framework Guides',
      collapsed: true,
      items: [
        'guides/frameworks/next-js',
        'guides/frameworks/vite-react',
        'guides/frameworks/django-flask',
        'guides/frameworks/rails',
        'guides/frameworks/go-htmx',
      ],
    },
    {
      type: 'category',
      label: 'AI Tool Guides',
      collapsed: true,
      items: [
        'guides/ai-tools/claude-code',
        'guides/ai-tools/cursor',
        'guides/ai-tools/windsurf-copilot',
        'guides/ai-tools/openclaw-clawdbot',
        'guides/ai-tools/aider-gemini',
      ],
    },
    {
      type: 'category',
      label: 'Ecosystem',
      collapsed: true,
      items: [
        'guides/ecosystem/what-is-mcp',
        'guides/ecosystem/best-mcp-servers-web-dev',
      ],
    },
  ],
};

export default sidebars;
