const controlUtils = {
  checkFormatType: function (formatType) {
    let result = {
      number:
        formatType == 'numeric' ||
        formatType == 'integer' ||
        formatType == 'money',
      currency: formatType == 'numeric' || formatType == 'money',
      integer: formatType == 'integer',
      date: formatType == 'date',
      time: formatType == 'time',
      datetime: formatType == 'datetime',
      time_hh: formatType == 'time_hh',
      time_mi: formatType == 'time_mi',
      time_ss: formatType == 'time_ss',
      formatTypeClass: 'c-ft-' + formatType,
      checkbox: formatType == 'boolean',
      type: null
    }
    if (result.number) {
      result.type = 'number'
    } else if (result.date || result.time) {
      result.type = formatType
    } else if (result.checkbox) {
      result.type = 'checkbox'
    }
    return result
  }
}
export default controlUtils
