export enum TrainFilterSection {
  TRAIN_TYPE = 'TRAIN_TYPE',
  TIMETABLE_TYPE = 'TIMETABLE_TYPE',
  COMMENTS = 'COMMENTS',
  TIMETABLE = 'TIMETABLE'
}

export const enum TrainFilterId {
  noComments = 'noComments',
  withComments = 'withComments',

  twr = 'twr',
  skr = 'skr',
  common = 'common',

  passenger = 'passenger',
  freight = 'freight',
  other = 'other',
  noTimetable = 'noTimetable',
  withTimetable = 'withTimetable'
}

export interface TrainFilter {
  id: TrainFilterId;
  section: TrainFilterSection;
  isActive: boolean;
}

export interface TrainSorter {
  id: string;
  value: string;
}

export const trainFilters: TrainFilter[] = [
  {
    id: TrainFilterId.twr,
    section: TrainFilterSection.TRAIN_TYPE,
    isActive: true
  },
  {
    id: TrainFilterId.skr,
    section: TrainFilterSection.TRAIN_TYPE,
    isActive: true
  },
  {
    id: TrainFilterId.common,
    section: TrainFilterSection.TRAIN_TYPE,
    isActive: true
  },

  {
    id: TrainFilterId.passenger,
    section: TrainFilterSection.TIMETABLE_TYPE,
    isActive: true
  },
  {
    id: TrainFilterId.freight,
    section: TrainFilterSection.TIMETABLE_TYPE,
    isActive: true
  },
  {
    id: TrainFilterId.other,
    section: TrainFilterSection.TIMETABLE_TYPE,
    isActive: true
  },

  {
    id: TrainFilterId.withComments,
    section: TrainFilterSection.COMMENTS,
    isActive: true
  },
  {
    id: TrainFilterId.noComments,
    section: TrainFilterSection.COMMENTS,
    isActive: true
  },

  {
    id: TrainFilterId.withTimetable,
    section: TrainFilterSection.TIMETABLE,
    isActive: true
  },
  {
    id: TrainFilterId.noTimetable,
    section: TrainFilterSection.TIMETABLE,
    isActive: true
  }
];

export const sorterOptions: TrainSorter[] = [
  {
    id: 'distance',
    value: 'kilometraż'
  },
  {
    id: 'id',
    value: 'id rozkładu'
  },
  {
    id: 'progress',
    value: 'przebyta trasa'
  },
  {
    id: 'delay',
    value: 'opóźnienie'
  },
  {
    id: 'mass',
    value: 'masa'
  },
  {
    id: 'speed',
    value: 'prędkość'
  },
  {
    id: 'length',
    value: 'długość'
  }
];
