import EditComponent from "./index.vue";

const Edit = {};

Edit.install = (Vue) => {
    const EditConstructor = Vue.extend(EditComponent);;
    const instance = new EditConstructor();

    instance.$mount(document.createElement('div'));
    document.body.appendChild(instance.$el);

    Vue.$edit = () => {
        instance.show = true;
    }
    Vue.prototype.$edit = (opt) => {
        instance.opt = opt;
        instance.show = true;
    }
}

export default Edit;