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

export const pxPaths = {
  module: 'people-experience',
  managerSurveys: 'manager/surveys',
  managerResultsParticipation: 'participation',
  managerResultsNps: 'nps',
  managerResultsList: 'list',
  managerResultsHeatmap: 'heatmap',
  managerResultsExperimental: 'results-experimental',
};

export const pxRoutes = {
  base: () => '/people-experience',
  collaboratorSurveysBase: () => `${pxRoutes.base()}/surveys`,
  collaboratorSurvey: (surveyId?: ManagerSurvey['id']) =>
    `${pxRoutes.collaboratorSurveysBase()}/${surveyId ?? ':id'}`,
  managerSurveysBase: () => `${pxRoutes.base()}/manager/surveys`,
  surveyManagerResults: (surveyId?: ManagerSurvey['id']) =>
    `${pxRoutes.managerSurveysBase()}/${surveyId ?? ':id'}/results`,
  surveyManagerResultsExperimental: () =>
    `${pxRoutes.managerSurveysBase()}/:id/results-experimental`,
};

export const pxLinks = {
  managerSurvey: (surveyId: ManagerSurvey['id']) =>
    `/${pxPaths.module}/${pxPaths.managerSurveys}/${surveyId}`,
  managerResultsExperimental: (surveyId: ManagerSurvey['id']) =>
    `${pxLinks.managerSurvey(surveyId)}/${pxPaths.managerResultsExperimental}`,
  managerResultsParticipation: (surveyId: ManagerSurvey['id']) =>
    `${pxLinks.managerResultsExperimental(surveyId)}/${pxPaths.managerResultsParticipation}`,
  managerResultsNps: (surveyId: ManagerSurvey['id']) =>
    `${pxLinks.managerResultsExperimental(surveyId)}/${pxPaths.managerResultsNps}`,
  managerResultsList: (surveyId: ManagerSurvey['id']) =>
    `${pxLinks.managerResultsExperimental(surveyId)}/${pxPaths.managerResultsList}`,
  managerResultsHeatmap: (surveyId: ManagerSurvey['id']) =>
    `${pxLinks.managerResultsExperimental(surveyId)}/${pxPaths.managerResultsHeatmap}`,
};
