import { useUpdateUserContext } from '../queries/userContext.js';
import { useEffect } from 'react';
export const useSaveWizardProgress = (wizardId, wizardState, stepIdsToSkip) => {
    const { mutate: updateUserContext } = useUpdateUserContext();
    useEffect(() => {
        if (stepIdsToSkip.includes(wizardState.stepId)) {
            return;
        }
        updateUserContext({ lastWizardId: wizardId, lastWizardState: wizardState });
    }, [wizardId, wizardState]);
};
