import { useParams } from 'react-router';

export const useEmployeeLifecycleIds = () => {
  const params = useParams();
  const journeyId = params.journeyId ? parseInt(params.journeyId) : undefined;
  const stepId = params.stepId ? parseInt(params.stepId) : undefined;
  const taskId = params.taskId ? parseInt(params.taskId) : undefined;
  const answerId = params.answerId ? parseInt(params.answerId) : undefined;
  const progressionId = params.progressionId ? params.progressionId : undefined;

  const tag = params.tag ? params.tag : undefined;

  const answerToken = params.answerToken ? params.answerToken : undefined;

  return {
    journeyId,
    stepId,
    taskId,
    progressionId,
    tag,
    answerId,
    answerToken,
  };
};
