import { coursesRoutes } from '../courses/routes';

export const pathsRoutes = {
  base: () => '/paths',
  detail: (pathId: number) => `${pathsRoutes.base()}/${pathId}`,
  completion: (pathId: number) => `${pathsRoutes.detail(pathId)}/completion`,
  courses: (pathId: number) => ({
    base: () => `${pathsRoutes.detail(pathId)}${coursesRoutes.base()}`,
    detail: (courseId: number) =>
      `${pathsRoutes.detail(pathId)}${coursesRoutes.detail(courseId)}`,
    lesson: (courseId: number, lessonId: number, tag: string) =>
      `${pathsRoutes.detail(pathId)}${coursesRoutes.lesson(courseId, lessonId, tag)}`,
    completion: (courseId: number) =>
      `${pathsRoutes.detail(pathId)}${coursesRoutes.completion(courseId)}`,
    sign: (courseId: number) =>
      `${pathsRoutes.detail(pathId)}${coursesRoutes.sign(courseId)}`,
  }),
};
