<template>
  <v-snackbar
    v-model="snackbarStore.show"
    :color="snackbarStore.color"
    :timeout="snackbarStore.timeout"
    location="bottom center"
  >
    {{ snackbarStore.text }}
    <template v-slot:actions>
      <v-btn color="white" variant="text" @click="snackbarStore.show = false">
        Close
      </v-btn>
    </template>
  </v-snackbar>
</template>

<script setup lang="ts">
import { useSnackbarStore } from '~/store/snackbar';

const snackbarStore = useSnackbarStore();
</script>
