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

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

    customize?.(odpEvent);

    sendEvent(odpEvent, state);
};
