/* eslint-disable @typescript-eslint/no-extraneous-class */
import { ReportingEventTypes } from './ReportingEventTypes.js';
export class ReportingEvents {
    /**
     * Dispatches the general error event for UI logging purposes.
     *
     * @param description The error description
     * @param error Optional original error object that has caused this event
     * @param component Optional component name.
     * @param target A node on which to dispatch the event
     */
    static error(description, error, component, target = window) {
        const detail = { error, description, component };
        const e = new CustomEvent(ReportingEventTypes.error, {
            bubbles: true,
            composed: true,
            cancelable: true,
            detail,
        });
        target.dispatchEvent(e);
    }
}
//# sourceMappingURL=ReportingEvents.js.map