import Main from './NavigationBar.vue';

let TabBarConstructor = Vue.extend(Main);
let instance;

const NavigationBar = (options) => {
    options = options || {};

    const existInstance = document.querySelector('.bl__navigationbar-container');

    if (existInstance) {
        return;
    }

    instance = new TabBarConstructor({
        data: options
    });

    instance.vm = instance.$mount();
    document.body.appendChild(instance.vm.$el);
    instance.vm.visible = true;
    instance.dom = instance.vm.$el;
    
    return instance.vm;
};

export default NavigationBar;
export {
    instance
};