import { type CoursesListParams } from '../Courses/types';

import { type PathsPagination } from './types';

export const pathsKeys = {
  all: () => ['paths'],
  stats: () => [...pathsKeys.all(), 'stats'],
  showAdminInformation: () => [...pathsKeys.all(), 'showAdminInformation'],
  courses: {
    all: () => [...pathsKeys.all(), 'courses'],
    list: (params: Partial<CoursesListParams>) => [
      ...pathsKeys.courses.all(),
      params,
    ],
  },
  paths: {
    all: () => [...pathsKeys.all(), 'paths-table'],
    list: (params: PathsPagination) => [...pathsKeys.paths.all(), params],
  },
  detail: (pathId: number) => [...pathsKeys.all(), 'detail', pathId],
  audience: (pathId: number) => [...pathsKeys.all(), 'audience', pathId],
} as const;
