import { appConstant } from "@/app";
import { ModelSceneStatus, QuoteSceneStatus, SceneType } from "@/store/scene";

export const SceneTypeDesc: { [key in SceneType]: string } = {
  [SceneType.SWKK]: "八目",
  [SceneType.SWKJ]: "双目转台",
  [SceneType.SWSS]: "激光转台点云场景",
  [SceneType.SWMX]: "三维模型",
  [SceneType.SWSSMX]: "激光转台Mesh场景",
  [SceneType.SWYDSS]: "激光移动点云场景",
  [SceneType.SWYDMX]: "激光移动Mesh场景",
  [SceneType.QJKK]: "全景看看",
};

export const SceneTypeDomain: { [key in SceneType]: string } = {
  [SceneType.SWKK]: window.location.href,
  [SceneType.SWKJ]: window.location.href,
  [SceneType.SWSS]: window.location.href,
  [SceneType.SWMX]: window.location.href,
  [SceneType.SWSSMX]: window.location.href,
  [SceneType.SWYDSS]: window.location.href,
  [SceneType.SWYDMX]: window.location.href,
  [SceneType.QJKK]:
    window.location.protocol + "//" + window.location.hostname + ":" + 13000,
};

export const SceneTypePaths: { [key in SceneType]: string[] } = {
  [SceneType.SWKK]: [
    "/swkk/spg.html",
    "/swkk/epg.html",
    `/swkk/livestream/fd/${appConstant.name}.html`,
  ],
  [SceneType.SWKJ]: ["/swkk/spg.html", "/swkk/epg.html"],
  [SceneType.SWSS]: ["/swss/index.html", "/swss/index.html"],
  [SceneType.SWMX]: import.meta.env.DEV
    ? ["/dev-code/index.html", "/dev-code/index.html"]
    : ["/code/index.html", "/code/index.html"],
  [SceneType.SWSSMX]: ["/swkk/spg.html", "/swkk/epg.html"],
  [SceneType.SWYDSS]: ["/swss/index.html", "/swss/index.html"],
  [SceneType.SWYDMX]: ["/swkk/spg.html", "/swkk/epg.html"],
  [SceneType.QJKK]: ["/panorama/show.html", "/panorama/edit.html"],
};

export const QuoteSceneStatusDesc: { [key in QuoteSceneStatus]: string } = {
  [QuoteSceneStatus.DEL]: "场景被删",
  [QuoteSceneStatus.RUN]: "计算中",
  [QuoteSceneStatus.ERR]: "计算失败",
  [QuoteSceneStatus.SUCCESS]: "计算成功",
  [QuoteSceneStatus.ARCHIVE]: "封存",
  [QuoteSceneStatus.RERUN]: "重新计算中",
};

export const ModelSceneStatusDesc: { [key in ModelSceneStatus]: string } = {
  [ModelSceneStatus.CANCEL]: "已取消",
  [ModelSceneStatus.ERR]: "上传失败",
  [ModelSceneStatus.RUN]: "上传中",
  [ModelSceneStatus.SUCCESS]: "成功",
};

export const ModelSupportType = ["obj", "ply", "las", "osgb", "b3dm"];
export const ModelSupportFormats = [".zip"];
export const ModelMaxSize = 1024 * 1024 * 1024;
