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

export const option = {
  dataset: {
    startName: '救援队伍1',
    startLngLat: [117.923964,35.405512],
    way: [
      {
        wayName: '国庄村',
        wayLngLat: [117.915252,35.365226],
        wayFlag: true,
      },
    ],
    endName: '费县北站',
    endLngLat: [117.931713,35.319092],
  },
  dataStyle:{    
    marginTop: 25,
    marginLeft: 30,

    // 关闭按钮
    closeButtonWidth: 52,
    closeButtonHeight: 30,

    // 标题
    titleFontColor: '#58FF95',
    titleFontSize: 18,
    titleSvgWidthAndHeight: 44,
    // 起点、终点、途径点
    waySvgWidth: 346,
    waySvgHeight: 30,

    wayStartFontColor: '#FFFFFF',
    wayStartFontSize: 16,

    wayFontColor: '#FFFFFF',
    wayFontSize: 16,
    wayButtonWidth: 35,
    wayButtonHeight: 35,

    // 规划方案
    planFontColor: '#58FF95',
    planFontSize: 18,
    planButtonWidth: 43,
    planButtonHeight: 44,
    driveOrWalkWidth: 81,
    driveOrWalkHeight: 23,
    driveOrWalkFontSize: 16,
    driveOrWalkFontColor: '#FFFFFF',
    // 按钮
    buttonFontColor: '#FFFFFF',
    buttonFontSize: 16,
  },
}

export default class Config extends PublicConfigClass implements CreateComponentType {
  public key = ZhiChu_LuXianGuHuaConfig.key
  public attr = { ...chartInitConfig, w: 417, h: 891, zIndex: -1 }
  public chartConfig = cloneDeep(ZhiChu_LuXianGuHuaConfig)
  public option = cloneDeep(option)
  public filter = "return res.result;"
}