import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
import apiSidebar from './docs/api/sidebar';

// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)

/**
 * Creating a sidebar enables you to:
 - create an ordered group of docs
 - render a sidebar for each doc of that group
 - provide next/previous navigation

 The sidebars can be generated from the filesystem, or explicitly defined here.

 Create as many sidebars as you want.
 */
const sidebars: SidebarsConfig = {
  docsSidebar: [
    {
      type: 'category',
      label: 'Getting Started',
      className: 'menu__list-item-flat',
      collapsible: false,
      items: [
        'introduction',
        'quick-start',
        {
          type: 'category',
          label: 'Installation',
          collapsed: false,
          link: { type: "doc", id: "installation/README" },
          items: [
            'installation/docker-images',
            'installation/examples',
          ]
        },
      ]
    },
    {
      type: 'category',
      label: 'Reference',
      className: 'menu__list-item-flat',
      collapsible: false,
      items: [
        {
          type: 'category',
          label: 'Configuration',
          collapsed: false,
          link: { type: "doc", id: "configuration/README" },
          items: [
            'configuration/authentication',
            'configuration/capture',
            'configuration/desktop',
            'configuration/webrtc',
            'configuration/plugins',
          ]
        },
        {
          type: 'category',
          label: 'Customization',
          collapsed: false,
          link: { type: "doc", id: "customization/README" },
          items: [
            'customization/networking',
            'customization/browsers',
            'customization/ui',
          ]
        },
        {
          type: 'category',
          label: 'Developer Guide',
          collapsed: true,
          link: { type: "doc", id: "developer-guide/README" },
          items: [
            'developer-guide/repository-structure',
            'developer-guide/build',
            {
              type: 'link',
              label: 'API Reference',
              description: 'OpenAPI documentation for the Neko API',
              href: '/docs/v3/api',
            },
          ]
        },
        'migration-from-v2/README',
        'reverse-proxy-setup'
      ]
    },
    //{
    //  type: 'category',
    //  label: 'Hardware Acceleration',
    //  items: [{ type: "autogenerated", dirName: "hardware-acceleration" }]
    //},
    {
      type: 'category',
      label: 'Help & Support',
      className: 'menu__list-item-flat',
      collapsible: false,
      items: [
        'faq',
        'troubleshooting',
        'release-notes',
        'roadmap',
      ]
    },
  ],
  apiSidebar: require("./docs/api/sidebar.js"),
};

export default sidebars;
