<template>
  <v-snackbar v-model="modelValue" timeout="300000" variant="flat">
    <v-icon class="pr-3 shark-400" icon="error" />
    <span class="shark-950">{{ t('texts.annotationDeleted') }}</span>
    <template #actions>
      <v-btn class="ml-auto mr-3 pr-4 pl-5" color="minsk_900" variant="flat" @click="undo">
        <span>{{ t('labels.undo') }}</span>
      </v-btn>
      <v-icon class="ml-auto pr-3 shark-400" icon="close" size="small" @click="modelValue = false" />
    </template>
  </v-snackbar>
</template>

<script setup lang="ts">
import { useI18n } from 'vue-i18n';

const { t } = useI18n();

const modelValue = defineModel<boolean>({ default: false });

function undo(): void {
  // TODO: implement
  modelValue.value = false;
}
</script>
