import { defineStore } from 'pinia' import { ref } from 'vue' export interface Notification { id: string topic: string severity: 'info' | 'warning' | 'error' title: string body: string link?: string read_at?: string created_at: string } export const useNotificationsStore = defineStore('notifications', () => { const items = ref([]) const unreadCount = ref(0) function setItems(list: Notification[]) { items.value = list } function setUnreadCount(n: number) { unreadCount.value = n } return { items, unreadCount, setItems, setUnreadCount } })