import { createEvent, OdpEvent, sendEvent } from "@insite/client-framework/OdpEvents/OdpEvent";
import ApplicationState from "@insite/client-framework/Store/ApplicationState";
import PageProps from "@insite/client-framework/Types/PageProps";

export const sendUpdateAccountEvent = (state: ApplicationState, customize?: (odpEvent: OdpEvent) => void) => {
    const odpEvent = createEvent("account", state);
    odpEvent.properties["action"] = "update";

    customize?.(odpEvent);

    sendEvent(odpEvent, state);
};
