export const envAreaEditorPageUrl = `${import.meta.env.VITE_VIEW_URL}/env-area`;

export const envAreaPreviewPageUrl = `${import.meta.env.VITE_VIEW_URL}/env-area/preview`;

/**
 * 环境监控模块与其区域 Iframe 内嵌网页通信的消息前缀
 */
export const envAreaMsgPrefix = 'hvac-env-monitor';

/**
 * 环境监控模块与其区域 Iframe 内嵌网页通信的消息类型
 */
export const enum EnvAreaMsgType {
  EditLoaded = 'edit-loaded',
  EditArea = 'edit-area',
  EditOutdoorTempHumidity = 'edit-outdoor-temp-humidity',
  SubmitEditArea = 'submit-edit-area',
  CancelEditArea = 'cancel-edit-area',
  PreviewLoaded = 'preview-loaded',
  PreviewArea = 'preview-area',
  HighlightEnvMonitorPoint = 'highlight-env-monitor-point',
  HighlightCanvasMonitorPoint = 'highlight-canvas-monitor-point',
}

export const getEnvAreaMsgType = (type: EnvAreaMsgType) => {
  return envAreaMsgPrefix + '-' + type;
};
