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

Vue.component('brick-btn-layout', {
    delimiters: ['<<', '>>'],
    props: [
        'brick',
    ],
    methods: {
        emit() {
            EventBus.emitEvent(EventTypes.BRICK_LAYOUT_UPDATE_SHOW, this);
        }
    },
    template: `
      <button
          class="btn brick-action brick-layout"
          title="Changer la mise en page de la section"
          v-on:click="emit"
      >
        <i class="far fa-table-layout"></i>
      </button>
    `,
});