export const DIRECTIONS = [
  { key: 'xl_tunnel_up', value: 0 },
  { key: 'xl_tunnel_down', value: 1 }
]

export const CAR_SIMPLE_TYPES = ['危化品车', '客车', '轿车', '货车', '其他车']

export const EVENT_TYPES = [
  { name: '急加速', key: '0' },
  { name: '急减速', key: '1' },
  { name: '实线变道', key: '2' },
  { name: '蛇形驾驶', key: '3' },
  { name: '逆行', key: '4' },
  { name: '拥堵', key: '5' },
  { name: '可疑事件', key: '6' },
  { name: '追尾', key: '7' },
  { name: '停车', key: '8' },
  { name: '超速', key: '16' },
  { name: '其他', key: '100' },
  { name: '无', key: '99' },
  { name: '机动车闯禁行', key: '22' },
  { name: '大型客车', key: '21' },
]

export const MODEL_CLASS = [
  { name: '设施', key: '0' },
  { name: '设备', key: '1' },
  { name: '交通工具', key: '2' }
]

export const MODEL_TYPES = [
  { name: '2.5D', key: '0' },
  { name: '3D', key: '1' }
]

export const EVENT_STATUS = [
  { name: '待处置', key: '0' },
  { name: '处置中', key: '1' },
  { name: '已处置', key: '2' },
  { name: '待处置-已读', key: '3' }
]

export const CAR_TYPES = [
  { name: '危化品车', key: 'dangerous', type: '0', car_width: 12, car_length: 36  },
  { name: '客车', key: 'passenger', type: '1', car_width: 12, car_length: 36 },
  { name: '轿车', key: 'sedan', type: '2', car_width: 12, car_length: 36 },
  { name: '货车', key: 'truck', type: '3', car_width: 12, car_length: 36 },
  { name: '其他车', key: 'other', type: '4', car_width: 12, car_length: 36 }
]

export const TUNNEL_TYPES = [
  { name: '双洞双向', key: 0, disabled: false },
  { name: '单洞双向', key: 1, disabled: true },
  { name: '单洞单向', key: 2, disabled: true },
]

export const ROAD_MARK_TYPES = [
  { name: '车道', key: 'x0' },
  { name: '停车带', key: 'x1' },
  { name: '方向线', key: 'x2' }
]

export const ROAD_LINE_TYPES = [
  { name: '虚线', key: 'x0' },
  { name: '实线', key: 'x1' }
]

export const FACILITY_TYPES = [
  { name: '人通', key: 'x0' },
  { name: '汽通', key: 'x1' }
]

export const EQUIPMENT_TYPES = [
  { name: '摄像机', key: 'x0' },
  { name: '亮度检测器', key: 'x1' },
  { name: '能见度检测器', key: 'x2' },
  { name: 'CO检测器', key: 'x3' },
  { name: '风速风向检测器', key: 'x4' },
  { name: '车辆检测器', key: 'x5' },
  { name: '可变信息屏', key: 'x6' }
]

export const EQUIPMENT_TUNNEL = [
  { name: '上行洞', key: 0 },
  { name: '下行洞', key: 1 }
]

export const EQUIPMENT_DIRECTION = [
  { name: '左侧', key: 0 },
  { name: '中间', key: 1 },
  { name: '右侧', key: 2 }
]

export const EVENT_SOURCE = [
  { name: '隧道监测', key: 1 },
  { name: '隧道管控', key: 2 }
]


// 异步字典

import { useTunnelStoreWithOut } from '@/store/modules/tunnel'
const tunnelStore = useTunnelStoreWithOut()

export const ASYNC_DIRECTIONS = () => {
  
  return [
    { name: tunnelStore.getUpTunnel.directionName, key: '上行', inkey: 0, seKey: 'xl_tunnel_up' },
    { name: tunnelStore.getDownTunnel.directionName, key: '下行', inkey: 1, seKey: 'xl_tunnel_down' }
  ]

}