///
/// Copyright © 2021 DataSQRL (contact@datasqrl.com)
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
///     http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///

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 = {
  tutorialSidebar: [
    {
      type: 'doc',
      id: 'intro/index',
      label: '📖 Overview',
    },
    {
      type: 'doc',
      id: 'intro/getting-started',
      label: '🚀 Getting Started',
    },
    {
      type: 'category',
      label: '🧱 Core Concepts',
      collapsed: false,
      items: [
        {
          type: 'doc',
          id: 'sqrl-language',
          label: '📚 SQRL Language',
        },
        {
          type: 'doc',
          id: 'connectors',
          label: '🔌 Source & Sink Connectors',
        },
        {
          type: 'doc',
          id: 'interface',
          label: '🔗 Interface',
        },
        {
          type: 'category',
          label: '⚙️ Configuration',
          link: {
            type: 'doc',
            id: 'configuration',
          },
          items: [
            {
              type: 'doc',
              id: 'configuration-engine/flink',
              label: 'Flink Engine',
            },
            {
              type: 'doc',
              id: 'configuration-engine/kafka',
              label: 'Kafka Engine',
            },
            {
              type: 'doc',
              id: 'configuration-engine/vertx',
              label: 'Vert.x Engine',
            },
            {
              type: 'doc',
              id: 'configuration-engine/postgres',
              label: 'PostgreSQL Engine',
            },
            {
              type: 'doc',
              id: 'configuration-engine/iceberg',
              label: 'Iceberg Engine',
            },
            {
              type: 'doc',
              id: 'configuration-engine/duckdb',
              label: 'DuckDB Engine',
            },
            {
              type: 'doc',
              id: 'configuration-engine/snowflake',
              label: 'Snowflake Engine',
            },
            {
              type: 'doc',
              id: 'configuration-default',
              label: 'Default Configuration',
            },
            {
              type: 'doc',
              id: 'configuration-engine/cloud-deployment',
              label: 'Deployment Configuration',
            },
          ],
        },
        {
          type: 'category',
          label: '🔢 Functions',
          link: {
            type: 'doc',
            id: 'functions',
          },
          items: [
            {
              type: 'doc',
              id: 'functions-system-generated',
              label: 'System Functions',
            },
            {
              type: 'doc',
              id: 'functions-library-generated',
              label: 'Library Functions',
            },
          ],
        },
        {
          type: 'doc',
          id: 'compiler',
          label: '🛠️ Compiler',
        },
        {
          type: 'doc',
          id: 'intro/concepts',
          label: '🧠 Streaming Concepts',
        }
      ],
    },
    {
      type: 'doc',
      id: 'intro/examples',
      label: '🎓 Examples',
    },
    {
      type: 'category',
      label: '📘 How To',
      link: {
        type: 'generated-index',
        description: 'Practical guides for developing data pipelines with DataSQRL to be used as skills or context for coding agents.',
      },
      items: [
        {
          type: 'autogenerated',
          dirName: 'howto',
        },
      ],
    },
    {
      type: 'category',
      label: '🧪 Advanced',
      items: [
        {
          type: 'doc',
          id: 'deepdive',
          label: '👩‍💻 How DataSQRL Works',
        },
        {
          type: 'doc',
          id: 'compatibility',
          label: '🔄 Compatibility',
        },
      ],
    },
  ],
};

module.exports = sidebars;

export default sidebars;
