import EventNoteIcon from '@material-hu/icons/material/EventNote';
import HelpOutlineOutlinedIcon from '@material-hu/icons/material/HelpOutlineOutlined';
import LightbulbOutlinedIcon from '@material-hu/icons/material/LightbulbOutlined';
import ProductionQuantityLimitsOutlinedIcon from '@material-hu/icons/material/ProductionQuantityLimitsOutlined';
import ReceiptLongOutlinedIcon from '@material-hu/icons/material/ReceiptLongOutlined';

import { recognitionsRoutes } from 'src/pages/dashboard/recognitions/routes';
import {
  TransactionOptionsTypes,
  TransactionStatusTypes,
} from 'src/types/recognitions';

export const IDEA_STATUS = {
  IN_PROCESS: 'En Proceso',
  APPROVED: 'Aprobado',
  PENDING: 'Pendiente',
  CANCELED: 'Cancelado',
  REJECTED: 'Rechazado',
};

export const IDEA_STATUS_ID = {
  PENDING: 1,
  IN_PROCESS: 2,
  IN_DRAFT: 13,
};

export const CATEGORIES = [
  {
    id: 1,
    name: 'S - Seguridad',
    classification: 'S',
  },
  {
    id: 2,
    name: 'Q - Mejorar calidad',
    classification: 'Q',
  },
  {
    id: 3,
    name: 'D - Productividad',
    classification: 'D',
  },
  {
    id: 4,
    name: 'C - Reducción gasto',
    classification: 'C',
  },
  {
    id: 5,
    name: 'C - Ahorro Capex',
    classification: 'C',
  },
  {
    id: 6,
    name: 'C - Consumo materia prima',
    classification: 'C',
  },
  {
    id: 7,
    name: 'C - Optimización personal',
    classification: 'C',
  },
  {
    id: 8,
    name: 'M - Moral',
    classification: 'M',
  },
  {
    id: 9,
    name: 'E - Ahorro energía',
    classification: 'E',
  },
  {
    id: 10,
    name: 'E - Medio ambiente',
    classification: 'E',
  },
];

export const OCURRENCE_OPTIONS = ['A', 'B', 'C', 'D', 'E'].map(e => ({
  value: e,
  label: e,
}));

export const SEVERITY_OPTIONS = ['1', '2', '3', '4', '5'].map(e => ({
  value: e,
  label: e,
}));

export const QUALITY_OPTIONS = [
  {
    value: 'Scrap',
    label: 'Scrap',
  },
  {
    value: 'Retrabajo',
    label: 'Retrabajo',
  },
];

export const RAW_MATERIAL_OPTIONS = [
  {
    value: 'Arena',
    label: 'Arena',
  },
  {
    value: 'Metal',
    label: 'Metal',
  },
];

export const defaultValues = {
  employeeID: '',
  employeePlantID: '',
  employeeAreaID: '',
  ideaTitle: '',
  team: '',
  ideaPlantID: '',
  ideaAreaID: '',
  managerID: '',
  equipment: '',
  product: '',
  problemDescription: '',
  ideaProposal: '',
  category: '',
  ownIdea: '',
  hasSecurityRisks: '',
  hasNegativeImpact: '',
  isARepair: '',
  ideaImplemented: '',
  ideaBenefits: '',
  implementationDate: new Date().toISOString(),
  created: new Date().toISOString(),
  modified: new Date().toISOString(),
  statusID: 1,
  KaizalaGroupId: '159bdbd5-2cda-400a-a699-7c6dee43590b',
  existingDangers: '',
  ocurrence: '',
  severity: '',
  improvedStandards: '',
  defect: '',
  defectDetail: '',
  zone: '',
  equipmentImproved: '',
  delayCodes: '',
  timeReduction: '',
  sapCode: '',
  usageFrecuency: '',
  unityCost: '',
  sapCodeChange: '',
  usageFrecuencyAfter: '',
  unityCostAfter: '',
  savings: '',
  improvedActivities: '',
  investment: '',
  materialSavings: '',
  kgsWasted: '',
  kgsWastedAfter: '',
  personsByShift: '',
  impactedTeams: '',
  improvedIndicator: '',
  active: 1,
};

export const transactionsOptions = [
  {
    id: 'All',
    name: TransactionOptionsTypes.ALL,
  },
  {
    id: 'Ingreso',
    name: TransactionOptionsTypes.INCOME,
  },
  {
    id: 'Incremento',
    name: TransactionOptionsTypes.INCREASE,
  },
  {
    id: 'Canje',
    name: TransactionOptionsTypes.EXCHANGE,
  },
];

export const statusOptions = [
  {
    id: 'Aprobado',
    name: TransactionStatusTypes.APPROVE,
  },
  {
    id: 'En Proceso',
    name: TransactionStatusTypes.IN_PROCESS,
  },
  {
    id: 'Pendiente',
    name: TransactionStatusTypes.PENDING,
  },
  {
    id: 'Cancelado',
    name: TransactionStatusTypes.CANCELED,
  },
  {
    id: 'Rechazado',
    name: TransactionStatusTypes.REJECTED,
  },
];

export const modulesOptions = [
  {
    title: 'CREATE_IDEA',
    icon: LightbulbOutlinedIcon,
    navigate: recognitionsRoutes.createIdea,
    hasNavigation: true,
  },
  {
    title: 'MY_IDEAS',
    icon: EventNoteIcon,
    navigate: recognitionsRoutes.ideas,
    hasNavigation: true,
  },
  {
    title: 'FREQUENT_QUESTIONS',
    icon: HelpOutlineOutlinedIcon,
    hasNavigation: false,
  },
  {
    title: 'CATALOGUE',
    icon: ProductionQuantityLimitsOutlinedIcon,
    navigate: recognitionsRoutes.products,
    hasNavigation: true,
  },
  {
    title: 'MY_TRANSACTIONS',
    icon: ReceiptLongOutlinedIcon,
    navigate: recognitionsRoutes.transactions,
    hasNavigation: true,
  },
];
