import type { UserConfig, DefaultThemeOptions } from 'vuepress'
import { path } from '@vuepress/utils'


const config: UserConfig<DefaultThemeOptions> = {

  base: '/vue-mark-text/',
  dest: 'doc/.vuepress/dist',

  // site-level locales config
  locales: {
    '/': {
      lang: 'en-US',
      title: 'docs',
      description: 'Vue-powered text highlighting',
    }
  },

  themeConfig: {
    locales: {
      '/': {
        navbar: false,
        search: false,
        sidebar: [
          {
            link: '/',
            text: 'vue-mark-text',
            children: []
          },
          {
            link: '/example.html',
            text: 'Example',
            children: []
          },
          {
            link: '/controller.html',
            text: 'Controller',
            children: []
          },
          {
            link: '/subject.html',
            text: 'Subject',
            children: []
          },
          {
            link: '/misc.html',
            text: 'Misc',
            children: []
          }
        ]
      }
    }
  },

  alias: {
    // enable template compiler
    'vue$': 'vue/dist/vue.esm-bundler.js',
    'vue-mark-text$': path.resolve(__dirname, '../../src/index.ts'),
  },

  clientAppEnhanceFiles: path.resolve(__dirname, './clientAppEnhance.ts'),

}

export = config
