// (C) 2021-2026 GoodData Corporation
import { isEmpty } from "lodash-es";
/**
 * Tests whether object is an instance of {@link IDashboardEvent}.
 *
 * @param obj - object to test
 * @public
 */
export function isDashboardEvent(obj) {
    return !isEmpty(obj) && obj.type?.startsWith("GDC.DASH/EVT");
}
/**
 * Tests whether object is an instance of {@link ICustomDashboardEvent}.
 *
 * @param obj - object to test
 * @public
 */
export function isCustomDashboardEvent(obj) {
    return !isEmpty(obj) && obj.type?.startsWith("CUSTOM/EVT");
}
/**
 * Tests whether object is an instance of {@link IDashboardEvent} or {@link ICustomDashboardEvent}.
 *
 * @param obj - object to test
 * @public
 */
export function isDashboardEventOrCustomDashboardEvent(obj) {
    return isDashboardEvent(obj) || isCustomDashboardEvent(obj);
}
