import { generateId } from "@intelligentgraphics/ig.utilities";
export const createNotificationCenterSubscription = (notificationCenter, data) => {
    const id = data.id === undefined ? generateId() : data.id;
    const send = (event, data) => notificationCenter.send(id, event, data);
    const destroy = () => notificationCenter.unsubscribe(id);
    return {
        id,
        send,
        destroy,
    };
};
