<script setup lang="ts">
import { useAppStore } from "@/stores/app";

const app = useAppStore();
</script>

<template>
  <div class="toast-host" aria-live="polite">
    <button v-for="toast in app.toasts" :key="toast.id" type="button" class="toast-item" :data-type="toast.type" @click="app.hideToast(toast.id)">
      {{ toast.message }}
    </button>
  </div>
</template>
