import type { Alert } from '@/types/alert';
type AlertInGroup = Alert & {
timestamp: number;
group: string;
};
/**
* @description Composable to access alert groups, alerts and functions to add, remove and get alerts by group.
* @example
* const { groups, alerts, addAlert, removeAlert, getAlerts } = useAlert()
* addAlert({
* title: 'Success!',
* modifiers: 'success',
* })
*
* ``
*
* @returns {
* alerts: ComputedRef reactive list of alerts default group,
* groups: ReactiveRef