import BasicModal from "./index.vue";

BasicModal.install = function (app) {
  app.component(BasicModal.name, BasicModal);
  app.mixin({
    methods: {
      showModal(ref) {
        const modal = this.$refs[ref];
        console.log(modal);
        if (modal) {
          modal.showModal();
        }
      },
      closeModal(ref) {
        const modal = this.$refs[ref];
        console.log(modal);
        if (modal) {
          modal.closeModal();
        }
      },
    },
  });
};

export default BasicModal;
