import $ from 'jquery';

export const goToStep = ( step: number ) => {
	$( `.wetail-return-portal__step[data-step="${ step === 0 ? step : step - 1 }"]` ).removeClass('wetail-return-portal__step--current' ).addClass( 'wetail-return-portal__step--hidden');
	$( `.wetail-return-portal__step[data-step="${ step }"]` ).removeClass('wetail-return-portal__step--hidden').addClass( 'wetail-return-portal__step--current' );
	const steps = $( '.wetail-return-portal__steps');
	steps.removeClass( `step-${ step - 1 }` );
	steps.addClass( `step-${ step }` );
};
