import config from '@/common/mx-config'

export default {
  data() {
    return {
      electiveColorMap: {
        R: config.color.error,
        r: config.color.error,
        G: config.color.success,
        g: config.color.success,
        B: config.color.blue_up,
        b: config.color.blue_up,
        p: config.color.primary,
        P: config.color.primary,
        y: config.color.yellow_report,
        Y: config.color.yellow_report,
        o: config.color.yellow_report,
        O: config.color.yellow_report
      }
    }
  },
  methods: {
    matchElectiveColor(color) {
      return this.electiveColorMap[color] || color
    }
  }
}
