<template>
  <ModalDialog title="Warning!" @backdrop-click="$emit('cancel')">
    <div class="modal-message">
      There is a pending reward request. The reward must be cancelled before triggering a new
      task.<br />
      Would you like to cancel the pending reward?
    </div>
    <div class="modal-actions">
      <button @click="$emit('confirm')" class="btn btn-primary">Yes</button>
      <button @click="$emit('cancel')" class="btn btn-secondary">No</button>
    </div>
  </ModalDialog>
</template>

<script setup lang="ts">
import ModalDialog from '../shared/ModalDialog.vue'

defineEmits<{
  confirm: []
  cancel: []
}>()
</script>

<style scoped>
.modal-message {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: var(--modal-message-color, #333);
}
</style>
