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

// 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 = {
    // Manually defined sidebar with items in a logical order
    tutorialSidebar: [
        {
            type: "doc",
            id: "getting-started",
            label: "Getting Started",
        },
        {
            type: "category",
            label: "Data Source",
            items: [{ type: "autogenerated", dirName: "data-source" }],
        },
        {
            type: "category",
            label: "Entity",
            items: [{ type: "autogenerated", dirName: "entity" }],
        },
        {
            type: "category",
            label: "Relations",
            items: [{ type: "autogenerated", dirName: "relations" }],
        },
        {
            type: "category",
            label: "Working with Entity Manager",
            items: [
                {
                    type: "autogenerated",
                    dirName: "working-with-entity-manager",
                },
            ],
        },
        {
            type: "category",
            label: "Query Builder",
            items: [{ type: "autogenerated", dirName: "query-builder" }],
        },
        "query-runner",
        {
            type: "category",
            label: "Drivers",
            items: [{ type: "autogenerated", dirName: "drivers" }],
        },
        {
            type: "category",
            label: "Guides",
            items: [{ type: "autogenerated", dirName: "guides" }],
        },
        {
            type: "category",
            label: "Advanced Topics",
            items: [{ type: "autogenerated", dirName: "advanced-topics" }],
        },
        {
            type: "category",
            label: "Help",
            items: [{ type: "autogenerated", dirName: "help" }],
        },
        "future-of-typeorm",
    ],
}

export default sidebars
