import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

const config: Config = {
  title: 'MetoYou Docs',
  tagline: 'Desktop chat, local APIs, and plugin development',
  url: 'http://127.0.0.1',
  baseUrl: '/docusaurus/',
  organizationName: 'metoyou',
  projectName: 'metoyou',
  onBrokenLinks: 'throw',
  onBrokenMarkdownLinks: 'warn',
  i18n: {
    defaultLocale: 'en',
    locales: ['en']
  },
  presets: [
    [
      'classic',
      {
        docs: {
          routeBasePath: '/',
          sidebarPath: './sidebars.ts'
        },
        blog: false,
        theme: {
          customCss: './src/css/custom.css'
        }
      } satisfies Preset.Options
    ]
  ],
  themeConfig: {
    navbar: {
      title: 'MetoYou Docs',
      items: [
        { type: 'docSidebar', sidebarId: 'mainSidebar', position: 'left', label: 'Guides' },
        { to: '/user-guide/first-steps', label: 'User Guide', position: 'left' },
        { to: '/developer/contributing', label: 'Developer Guide', position: 'left' },
        { to: '/plugin-development/create-a-plugin', label: 'Plugin Guide', position: 'left' },
        { to: '/developer/rest-api', label: 'REST API', position: 'left' }
      ]
    },
    footer: {
      style: 'dark',
      links: [
        {
          title: 'Docs',
          items: [
            { label: 'First Steps', to: '/user-guide/first-steps' },
            { label: 'Voice Channels', to: '/user-guide/voice-channels' },
            { label: 'Plugins for Users', to: '/user-guide/plugins' },
            { label: 'Contributing', to: '/developer/contributing' },
            { label: 'Create a Plugin', to: '/plugin-development/create-a-plugin' },
            { label: 'Plugin API Reference', to: '/plugin-development/api-reference' },
            { label: 'Local REST API', to: '/developer/rest-api' }
          ]
        }
      ],
      copyright: 'MetoYou local documentation. Built with Docusaurus.'
    },
    prism: {
      additionalLanguages: [
        'bash',
        'json',
        'typescript'
      ]
    }
  } satisfies Preset.ThemeConfig
};

export default config;
