export type ReportFunction = (type: string, payload: any) => void;

let callback: ReportFunction = () => {};

export const implementReport = (cb: ReportFunction) => {
  callback = cb;
};

export const report: ReportFunction = (type, payload) => {
  callback(type, payload);
};

let callbackAem: ReportFunction = () => {};

export const implementReportAem = (cb: ReportFunction) => {
  callbackAem = cb;
};

export const reportAem: ReportFunction = (type, payload) => {
  callbackAem(type, payload);
};
