<template>
  <UModal :open="isOpen" title="Mitbestimmungsantrag löschen" @update:open="$emit('update:isOpen', $event)">
    <template #body>
      Möchten Sie wirklich den Mitbestimmungsantrag <strong>{{ applicationFormToDelete.name }}</strong> löschen?
    </template>
    <template #footer>
      <UButton label="Abbrechen" color="neutral" variant="outline" @click="$emit('update:isOpen', false)" />
      <UButton label="Löschen" color="neutral" @click="$emit('delete', applicationFormToDelete.id)" />
    </template>
  </UModal>
</template>

<script setup lang="ts">
import type { ApplicationFormDto } from '~~/.api-client'

defineEmits<{
  (e: 'delete', id: string): void
  (e: 'update:isOpen', value: boolean): void
}>()

defineProps<{
  applicationFormToDelete: ApplicationFormDto
  isOpen: boolean
}>()
</script>
