const { resolve } = require('path')

const defaultOptions = {
  'bulma': {
    active: true
  },
  'mdi': {
    active: true
  },
  'animate.css': {
    active: true
  },
  'vue-in-viewport-directive': {
    active: true
  },
  'vue-scrollactive': {
    active: true
  },
  'vue-headroom': {
    active: true,
    options: { ssr: false }
  },
}

module.exports = function xui (moduleOptions) {
  const options = Object.assign(defaultOptions, moduleOptions)

  options['bulma'].active && this.options.css.push('bulma')
  options['mdi'].active && this.options.css.push('mdi/css/materialdesignicons.min.css')
  options['animate.css'].active && this.options.css.push('animate.css')

  options['vue-in-viewport-directive'].active && this.addPlugin({
    src: resolve(__dirname, './plugins/vue-in-viewport-directive.js'),
    options: options['vue-in-viewport-directive'].options
  })

  options['vue-scrollactive'].active && this.addPlugin({
    src: resolve(__dirname, './plugins/vue-scrollactive.js'),
    options: options['vue-scrollactive'].options
  })

  options['vue-headroom'].active && this.addPlugin({
    src: resolve(__dirname, './plugins/vue-headroom.js'),
    options: options['vue-headroom'].options
  })
}

module.exports.meta = require('./package.json')

@@ -305,37 +305,8 @@
 true
-,%0A    options: %7B ssr: false %7D
 %0A  %7D
@@ -1169,24 +1169,40 @@
 om'%5D.options
+,%0A    ssr: false
 %0A  %7D)%0A%7D%0A%0Amod

Fix headroom.js ssr