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

export const option = {
  borderColor: '#D5D5D5',
  textColors: ['#D0E6CF','#FFFFFF'],
  textSize: [14,28],
  backgroundColor: '#2D332B',
  dataset: [
    { label: '护林员' , value: '38' },
    { label: '消防员' , value: '75' },
    { label: '驻防队伍' , value: '102' },
    { label: '林区住户' , value: '103' },
    { label: '向导' , value: '103' },
    { label: '防火驿站' , value: '103' },
    { label: '墓地' , value: '103' },
  ],
  animalColor: [
    { color1: '#215229', color2: '#91F2A1' },
    { color1: '#81510E', color2: '#FFCF47' },
    { color1: '#5C230A', color2: '#FC2D22' },
    { color1: '#0A5C4D', color2: '#22FCF0' },
    { color1: '#0A5C2D', color2: '#22FC4A' },
    { color1: '#0A285C', color2: '#1832F1' },
    { color1: '#210A5C', color2: '#8222FC' }
  ]
}

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