// 测站
import functionCodeAddStation from '@/examples/measureStation/addStation/addStation-function.js?raw'
import functionCodeStationCoordinate from '@/examples/measureStation/stationCoordinate/stationCoordinate-function.js?raw'

// 动目标
import functionCodeVehicle from '@/examples/movingTarget/vehicle/vehicle-function.js?raw'
import functionCodeAircraft from '@/examples/movingTarget/aircraft/aircraft-function.js?raw'
import functionCodeCoordinateAxis from '@/examples/movingTarget/coordinateAxis/coordinateAxis-function.js?raw'
import functionCodeRocket from '@/examples/movingTarget/rocket/rocket-function.js?raw'

// 图元
import functionCodePoint from '@/examples/graphicElement/point/point-function.js?raw'
import functionCodeLine from '@/examples/graphicElement/line/line-function.js?raw'
import functionCodeMultiLine from '@/examples/graphicElement/multiLine/multiLine-function.js?raw'
import functionCodePlane from '@/examples/graphicElement/plane/plane-function.js?raw'
import functionCodeCirclesAndEllipses from '@/examples/graphicElement/circlesAndEllipses/circlesAndEllipses-function.js?raw'
import functionBox from '@/examples/graphicElement/box/box-function.js?raw'
import functionStraightArrow from '@/examples/graphicElement/straightArrow/straightArrow-function.js?raw'

// 场景设置
import functionCodeTerminatorLine from '@/examples/sceneSet/terminatorLine/terminatorLine-function.js?raw'
import functionCodeJingweiNetwork3D from '@/examples/sceneSet/jingweiNetwork3D/jingweiNetwork3D-function.js?raw'

// 天气
import functionCodeRain from '@/examples/weather/rain/rain-function.js?raw'
import functionCodeSnow from '@/examples/weather/snow/snow-function.js?raw'
import functionCodeFog from '@/examples/weather/fog/fog-function.js?raw'
import functionCodeWaterSurface from '@/examples/weather/waterSurface/waterSurface-function.js?raw'


const functionCodeMap = {
    // 测站
    添加测站: functionCodeAddStation,
    测站坐标系: functionCodeStationCoordinate,

    // 动目标
    车: functionCodeVehicle,
    飞机: functionCodeAircraft,
    坐标轴: functionCodeCoordinateAxis,
    火箭发射: functionCodeRocket,

    // 图元
    点: functionCodePoint,
    线: functionCodeLine,
    多颜色线: functionCodeMultiLine,
    面: functionCodePlane,
    椭圆: functionCodeCirclesAndEllipses,
    盒子: functionBox,
    直线箭头: functionStraightArrow,

    // 场景设置
    晨昏线: functionCodeTerminatorLine,
    经纬网络3D: functionCodeJingweiNetwork3D,

    // 天气
    雨: functionCodeRain,
    雪: functionCodeSnow,
    雾: functionCodeFog,
    水面: functionCodeWaterSurface,
}

export function findFunctionCodeById(id){
    if(!functionCodeMap.hasOwnProperty(id)){
        throw new Error(`${id}不存在`);
    } 
    return functionCodeMap[id]
}