import { range } from 'lodash-es';

import { FilterOption } from '@material-hu/components/composed-components/peopleExperience/npsResults/components/CommentsTableList/types';

export const getIntegerAnswerByFilter = (
  filter: FilterOption,
): number[] | undefined => {
  switch (filter) {
    case FilterOption.NEUTRALS:
      return [7, 8];
    case FilterOption.DETRACTORS:
      return range(1, 7);
    case FilterOption.PROMOTERS:
      return [9, 10];
    case FilterOption.ALL:
    default:
      return undefined;
  }
};
