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

const { source } = dataJson;

export const option = {
  dataset: source,
  dataStyle:{
    backgroud: '#FFFFFF00',
    marginTop: 10,
    marginLeft: 20,
    listMarginTop: 0,
    listMarginLeft: 0,
  },
  titleStyle: {
    dotColor: '#C9FFC7',
    dotSize: 12,
    dotMarginRight: 10,
    width: 100,
    height: 20,
    fontcolor: '#CBE6CD',
    fontsize: 16,
    align: 'left',
  },
  contentStyle: {
    width: 250,
    fontcolor: '#FFFFFF',
    fontsize: 16,
    align: 'left',
  }
}

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