<script lang="ts" setup>
import MainButton from './MainButton.vue';

defineEmits<{
  (e: 'click', v: MouseEvent): void;
}>();
defineProps<{
  iconOnly?: boolean;
  solid?: boolean;
  outlined?: boolean;
  disabled?: boolean;
  dark?: boolean;

  label?: string;

  amount?: number;
}>();
</script>

<template>
  <MainButton
    @click="(e) => $emit('click', e)"
    v-bind="{ ...$props, ...$attrs }"
    icon="mdi-content-save-outline"
    color="207 96% 32%"
    :title="iconOnly ? $t('general.save') : undefined"
  >
    {{ label || $t('general.save') }}
    {{ amount && amount > 0 ? `(${amount})` : '' }}
  </MainButton>
</template>
