
import DoBar from '../packages/DoBar/DoBar'
import DoLine from '../packages/DoLine/DoLine'
import DoLineAndBar from '../packages/DoLineAndBar/DoLineAndBar'
import DoMap from '../packages/DoMap/DoMap'
import DoPie from '../packages/DoPie/DoPie'

const components = [
    DoLine,
    DoBar,
    DoPie,
    DoLineAndBar,
    DoMap
]

const install = function (Vue) {
    components.forEach(component => {
        Vue.component(component.name, component)
    })
}

if (typeof window !== 'undefined' && window.Vue) {
    install(window.Vue);
}

export {
    install,
    DoLine,
    DoBar,
    DoPie,
    DoLineAndBar,
    DoMap
}

export default {
    install,
    DoLine,
    DoBar,
    DoPie,
    DoLineAndBar,
    DoMap
}