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

// DoLine.install = function (Vue) {
//     Vue.component(DoLine.name, DoLine)
// }

const components = [
    DoLine,
    DoBar,
    DoPie
]

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
}

export default {
    install,
    DoLine,
    DoBar,
    DoPie
}