• Hook to access the notification center functionality

    Returns {
        add: (notification: Omit<Notification, "id" | "timestamp">) => string;
        clear: () => void;
        clearAll: () => void;
        error: (
            title: string,
            message?: string,
            options?: Partial<Notification>,
        ) => string;
        hasNotifications: ComputedRef<boolean>;
        info: (
            title: string,
            message?: string,
            options?: Partial<Notification>,
        ) => string;
        notifications: ComputedRef<
            {
                actions?: { action: () => void; label: string; primary?: boolean }[];
                id: string;
                message?: string;
                persistent?: boolean;
                timeout?: number;
                timestamp: Date;
                title: string;
                type: "warning" | "info" | "error" | "success";
            }[],
        >;
        remove: (id: string) => void;
        success: (
            title: string,
            message?: string,
            options?: Partial<Notification>,
        ) => string;
        unreadCount: ComputedRef<number>;
        warning: (
            title: string,
            message?: string,
            options?: Partial<Notification>,
        ) => string;
    }

    Object containing notification management functions and reactive state

    • add: (notification: Omit<Notification, "id" | "timestamp">) => string

      Add a custom notification

    • clear: () => void

      Clear all notifications

    • clearAll: () => void

      Clear all notifications (alias for clear)

    • error: (title: string, message?: string, options?: Partial<Notification>) => string

      Add an error notification

    • hasNotifications: ComputedRef<boolean>

      Reactive boolean indicating if there are any notifications

    • info: (title: string, message?: string, options?: Partial<Notification>) => string

      Add an info notification

    • notifications: ComputedRef<
          {
              actions?: { action: () => void; label: string; primary?: boolean }[];
              id: string;
              message?: string;
              persistent?: boolean;
              timeout?: number;
              timestamp: Date;
              title: string;
              type: "warning" | "info" | "error" | "success";
          }[],
      >

      Reactive list of all notifications

    • remove: (id: string) => void

      Remove a notification by ID

    • success: (title: string, message?: string, options?: Partial<Notification>) => string

      Add a success notification

    • unreadCount: ComputedRef<number>

      Reactive count of unread notifications

    • warning: (title: string, message?: string, options?: Partial<Notification>) => string

      Add a warning notification