// (C) 2021-2026 GoodData Corporation
/**
 * Creates DashboardEvent predicate that test whether the provided event matches it.
 *
 * @alpha
 * @param eventType - dashboard event type
 * @param pred - predicate to test
 * @returns boolean - matches?
 */
export function newDashboardEventPredicate(eventType, pred) {
    return (event) => {
        if (event?.type !== eventType) {
            return false;
        }
        return pred?.(event) ?? true;
    };
}
