import { BizGlobalDataContext } from '@zgfe/business-lib';
import { useContext } from 'react';
export default function useEnum() {
  var _useContext = useContext(BizGlobalDataContext),
    currentApp = _useContext.currentApp;
  var isUser = (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) == 'user';
  var datasetTypeList = [{
    value: 1,
    label: '事件数据'
  }, {
    value: 2,
    label: !isUser ? '主体数据' : '用户数据'
  }];
  var mappingList = [[{
    id: 'eventName',
    label: '事件名称',
    defaultTarget: '【字符串】$eid',
    required: true,
    type: 'string'
  }, {
    id: 'userIdentify',
    label: "".concat(!isUser ? '主体' : '用户', "\u6807\u8BC6\u5B57\u6BB5"),
    defaultTarget: '【数值】$cuid',
    required: true,
    type: 'number'
  }, {
    id: 'timeField',
    label: '事件发生时间字段',
    defaultTarget: '【数值】$ct',
    type: 'number',
    required: true
  }, {
    id: 'attrs',
    label: '事件属性字段',
    type: 'list'
  }], [{
    id: 'userIdentify',
    label: "".concat(!isUser ? '主体' : '用户', "\u6807\u8BC6\u5B57\u6BB5"),
    defaultTarget: '【数值】$cuid',
    required: true
  }, {
    id: 'timeField',
    label: '时间字段',
    defaultTarget: '【数值】$ct',
    type: 'number',
    required: true
  }, {
    id: 'attrs',
    label: "".concat(!isUser ? '主体' : '用户', "\u5C5E\u6027\u5B57\u6BB5"),
    type: 'list'
  }]];
  return {
    datasetTypeList: datasetTypeList,
    mappingList: mappingList
  };
}