import { LAYER_IDS } from "./Map/Layers/constants";

export const STATUSES = {
  pending: "Pending",
  onApproval: "Installation",
  working: "Working",
  cancelled: "Cancelled",
};

export const STATUS_LABEL_MAPPER = {
  [STATUSES.pending]: "К рассмотрению",
  [STATUSES.onApproval]: "Согласование-установка",
  [STATUSES.working]: "Работает",
  [STATUSES.cancelled]: "Отменен",
};

export const CATEGORIES = {
  kiosk: "Городской киоск",
  mfc: "МФЦ",
  library: "Библиотека",
  sport: "Спортивный объект",
  retail: "Ритейл",
  residential: "Подъезд жилого дома",
  dk: "Дом культуры/Клуб",
};

export const DISABLED_FILTER_TEXT =
  "Фильтр заблокирован - было ручное редактирование";

export const MODES = {
  PENDING: "INITIAL",
  ON_APPROVAL: "ON_APPROVAL",
  WORKING: "WORKING",
};

export const MODE_TO_STATUS_MAPPER = {
  [MODES.PENDING]: [STATUSES.pending],
  [MODES.ON_APPROVAL]: [STATUSES.onApproval, STATUSES.working],
  [MODES.WORKING]: [STATUSES.working],
};

export const MODE_TO_LAYER_VISIBILITY_MAPPER = {
  [MODES.PENDING]: [LAYER_IDS.initial, LAYER_IDS.working, LAYER_IDS.cancelled],
  [MODES.ON_APPROVAL]: [
    LAYER_IDS.approve,
    LAYER_IDS.working,
    LAYER_IDS.cancelled,
  ],
  [MODES.WORKING]: [LAYER_IDS.filteredWorking],
};
