<script lang="ts" setup>
const buttonList = useRoute().meta.buttonAuth || [];
const emit = defineEmits<{
  "top-button-click": [eventName: string];
}>();
</script>

<template>
  <el-button
    v-for="button of buttonList"
    :key="button.buttonName"
    :type="button.colorType || 'primary'"
    @click="emit('top-button-click', button.eventName)"
  >
    {{ $t("_button." + button.eventName) }}
  </el-button>
</template>
