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

export const option = {
  boxId: 'linearGradientContentTitle02',
  colors: ['#1F6B55','#0A392A','#396754','#457453'],
  labelText: '取水点',
  labelColor: '#CBE7CD',
  labelSize: 14,
  valueText: '10',
  valueColor: '#4FE985',
  valueSize: 18,
  unitText: '个',
  unitColor: '#CBE7CD',
  unitSize: 10
}

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