import cloneDeep from 'lodash/cloneDeep'
import { PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { chartInitConfig } from '@/settings/designSetting'
import { WeiXingYaoGanConfig } from './index'
import dataJson from './data.json'

const {source} = dataJson;

export const option = {
  dataset: source,
  dataStyle: {
    margintop: 10,
    marginbottom: 20,
    marginleft: 20,
    marginright: 20,
    listWidth: 360,
    listHeight: 110,
    titleColor: '#ffffff',
    titleFontSize: 20,
    typeColor: '#FA521D',
    typeFontSize: 16,
    positionColor: '#ffffff',
    positionFontSize: 16,
    timeColor: '#ffffff',
    timeFontSize: 16,
    listMarginbottom: 0,
  }
}

export default class Config extends PublicConfigClass implements CreateComponentType {
  public key = WeiXingYaoGanConfig.key
  public attr = { ...chartInitConfig, w: 400, h: 475, zIndex: -1 }
  public chartConfig = cloneDeep(WeiXingYaoGanConfig)
  public option = cloneDeep(option)
}
