import { EventMessageTypeModel } from '../backend-api/index.js';
function objectIsUmbNotification(notification) {
    if (typeof notification !== 'object' || notification === null) {
        return false;
    }
    const object = notification;
    return (typeof object.category === 'string' &&
        typeof object.message === 'string' &&
        typeof object.type === 'string' &&
        Object.values(EventMessageTypeModel).includes(object.type));
}
/**
 * Checks if an array of unknown values are all valid UmbNotificationsEventModel objects.
 * @param {Array<unknown>} notifications The array to check.
 * @returns {boolean} True if all items are valid UmbNotificationsEventModel objects.
 */
export function isUmbNotifications(notifications) {
    return notifications.every(objectIsUmbNotification);
}
export const UMB_NOTIFICATION_HEADER = 'umb-notifications';
