export function updateCartBase(params) {
    const {
        isLocalEnv,
        apiUrl,
        apiType,
        hideLoader,
        callActionFn,
        actionCallback,
        initial,
        localUpdateFn,
        repaintData,
        context,
        charity,
        extraLocalActions = () => {},
        extraApiActions = () => {},
    } = params;
    if (!isLocalEnv) {
        const payload = {
            url: apiUrl,
            type: apiType,
            complete: hideLoader,
        };
        callActionFn(payload, actionCallback, { repaintData, context, charity, initial });
        extraApiActions();
    } else {
        localUpdateFn(initial, repaintData, context, charity, null);
        extraLocalActions();
    }
}
