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

Vue.component('brick-btn-update', {
    delimiters: ['<<', '>>'],
    props: [
        'brick',
    ],
    methods: {
        emit() {
            EventBus.emitEvent(EventTypes.BRICK_UPDATE, this);
        }
    },
    template: `
      <button
          class="btn brick-action brick-edit"
          title="Configurer"
          v-on:click="emit"
      >
      <i class="far fa-cog"></i>
      </button>
    `,
});