import cloneDeep from 'lodash/cloneDeep'
import { PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { chartInitConfig } from '@/settings/designSetting'
import { ZhiGan_GeneralHeadConfig } from './index'

export const option = {
  dataset: {
    value: '组件标题栏',
  },
  dataStyle: {
    fontSize: 20,
    fontColor: '#FFFFFF',
    x: 30,
    y: 30,
    
    gPolygonFillColorTL: '#EBBE10',
    gFillColorTR: '#00C157',
    gPolygonFillColorBL1: '#EBBE10',
    gPolygonFillColorBL2: '#4FE985',

    linearGradientStopColorR1: '#08251E',
    linearGradientStopColorR2: '#00A374',
    linearGradientStopColorL1: '#11B472',
    linearGradientStopColorL2: '#00A374',
    linearGradientStopColorM1: '#00FF8C',
    linearGradientStopColorM2: '#00F4B6',

    linearGradientStopColorRT1: '#00FF77',
    linearGradientStopColorRT2: '#00BF6B',
    linearGradientStopColorT1: '#00673F',
    linearGradientStopColorT2: '#00683F',
    linearGradientStopColorB1: '#72A18A',
    linearGradientStopColorB2: '#1CC370',
  }
}

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