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

const { source } = dataJson;

export const option = {
  dataset: source,
  dataStyle: {
    backgroud: '#FFFFFF00',
    margintop: 15,
    marginleft: 15,
    
    showTitle: true,
    titleColor: '#FFFFFF',
    titleFontSize: 16,
    titleMarginTop: 5,
    titleWidth: 181,
    titleHeight: 30,

    buttonColor1: '#008000',
    buttonColor2: '#7D8492',
    buttonSize: 24,

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

    borderWidth: 2,
    borderColor: '#008000', 
    padding: 4,

    titleColorStop1: '#1F6B55',
    titleColorStop2: '#0A392A',
    titleRightrColor: '#00611A',
    iconColorStop1: '#73F095',
    iconColorStop2: '#BBFDB5',
    iconStrokeColor: '#00611A',
    iconFillColor: '#0A251E',
    iconBottomColor: '#0E4030',
  },
}

export default class Config extends PublicConfigClass implements CreateComponentType {
  public key = ZhiGan_WuRenJiShiShiHuaMianConfig.key
  public attr = { ...chartInitConfig, w: 400, h: 353, zIndex: -1 }
  // public request = { ...requestSqlConfig, requestSQLContent: { sql: 'select * from zg_wurenjishishihuamian' }, }
  public filter = "return res.result;"
  public chartConfig = cloneDeep(ZhiGan_WuRenJiShiShiHuaMianConfig)
  public option = cloneDeep(option)
}
