import Vue from 'vue/dist/vue'
import EventBus from '../util/EventBus';
import EventTypes from '../util/EventTypes';

Vue.component('library-upload-btn', {
    props: {
    },
    data: function () {
        return {};
    },
    methods: {
        openUpload: function (event) {
            event.preventDefault();
            EventBus.$emit(EventTypes.LIBRARY_UPLOAD_PANE, true);
            return false;
        },
    },
    mounted() {
    },
    template: `
      <button class="library-upload-btn btn btn-primary"
              @click="openUpload"
      >
        <span><i class="fa-solid fa-down-to-bracket"></i> Envoyer des fichiers</span>
      </button>
    `
});