import { PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { DeviceStatusConfig } from './index'
import dataJson from './data.json'

export enum FontWeightEnum {
  NORMAL = '常规',
  BOLD = '加粗',
}

export enum FontStyleEnum {
  NORMAL = '常规',
  ITALIC = '斜体',
}

export const FontWeightObject = {
  [FontWeightEnum.NORMAL]: 'normal',
  [FontWeightEnum.BOLD]: 'bold',
}

export const FontStyleObject = {
  [FontStyleEnum.NORMAL]: 'normal',
  [FontStyleEnum.ITALIC]: 'italic',
}

export const option = {
  dataset: dataJson.source,
  header: ['所属企业', '设备类型', '设备名称'],
  headerTextColor: '#7F9DB4',
  textColor: '#ffffff',
  itemBackgroundColor: '#212936',
  timeTextColor: '#B75055',
  timeBgColor: '#562922',
  headerHeight: 30,
  itemHeight: 28,
  fontSize: 11,
  title: '设备实时在线概况',
  titleSize: 17,
  titleColor: '#ffffff',
  iconColor: '#00E5FF',
  onlineRate: 75,
  onlineDevice: 23,
  totalDevice: 100,
  progressColor: '#00E5FF',
  progressBgColor: 'rgba(0, 0, 0, 0.1)',
  progressTextColor: '#DDE3E9',
  paddingX: 60,
  paddingY: -4,
  letterSpacing: 1,
  // new properties from AlarmList
  fontWeight: 'normal',
  fontStyle: 'normal',
  isShowButton: false
}

export default class Config extends PublicConfigClass implements CreateComponentType {
  public key = DeviceStatusConfig.key
  public chartConfig = DeviceStatusConfig
  public option = option
}
