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

const { source } = dataJson;

export const option = {
  dataset: source,
  dataStyle: {
    backgroud: '#FFFFFF00',
    margintop: 15,
    marginleft: 15,

    titleColor: '#FFFFFF',
    titleFontSize: 16,
    titleMarginTop: 5,
    titleWidth: 181,
    titleHeight: 30,

    videoloop: true,  // 视频-循环播放
    videomuted: true, // 视频-静音
    videofit: 'fill', // 视频-适应方式
    videowidth: 181,
    videoheight: 115,
    videoMarginTop: 10,
  }
}

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