<template>
  <div v-if="open" class="modal-overlay" @click.self="$emit('cancel')">
    <div class="modal-card">
      <h3 class="modal-title">{{ t('actions.resetScores') }}</h3>
      <p class="modal-text">{{ t('messages.confirmReset') }}</p>
      <p class="modal-text subtle">{{ t('messages.resetProofPrompt') }}</p>
      <div class="modal-actions">
        <button class="btn btn-outline" @click="$emit('confirm', false)">{{ t('actions.resetOnlyScores') }}</button>
        <button class="btn btn-danger" @click="$emit('confirm', true)">{{ t('actions.resetScoresAndProofs') }}</button>
        <button class="btn btn-secondary" @click="$emit('cancel')">{{ t('actions.cancel') }}</button>
      </div>
    </div>
  </div>
</template>

<script setup>
defineProps({
  open: { type: Boolean, default: false },
  t: { type: Function, required: true },
})

defineEmits(['cancel', 'confirm'])
</script>

