<!-- eslint-disable vue/multi-word-component-names -->
<template>
  <button class="button">
    <slot name="default">
      <span v-if="icon !== undefined" class="icon">
        <FontAwesomeIcon v-if="icon !== undefined" :icon="icon" :beat-fade="busy" />
      </span>
    </slot>
    <span v-if="text !== undefined">{{ text }}</span>
  </button>
</template>

<script setup lang="ts">
withDefaults(
  defineProps<{
    icon?: string | string[];
    text?: string;
    busy?: boolean;
  }>(),
  {
    busy: false,
  },
);
</script>
