import {
  IconAWebyingyong,
  IconWangyeguajian,
  IconDingdingjiqiren,
  IconWendajiqiren,
  IconFeishujiqiren,
  IconQiyeweixinjiqiren,
  IconQiyeweixinkefu,
  IconADiscordjiqiren,
  IconWeixingongzhonghaoDaiyanse,
  IconBaizhiyunlogo,
  IconZhipuqingyan,
  IconDeepseek,
  IconTengxunhunyuan,
  IconAliyunbailian,
  IconHuoshanyinqing,
  IconAzure,
  IconGemini,
  IconQiniuyun,
  IconOllama,
  IconAZiyuan2,
  IconKim,
  IconXinference,
  IconGpustack,
  IconLingyiwanwu,
  IconChatgpt,
  IconAAIshezhi,
  IconHyperbolic,
  IconPerplexity,
  IconTianyiyun,
  IconTengxunyun,
  IconBaiduyun,
  IconModaGPT,
  IconInfini,
  IconStep,
  IconLanyun,
  IconAlayanew,
  IconPpio,
  IconAihubmix,
  IconOcoolai,
  IconDMXAPI,
  IconBurncloud,
  IconYingweida,
  IconTokenflux,
  IconA302ai,
  IconCephalon,
  IconFireworks,
  IconMistral,
  IconOpenrouter,
} from '@panda-wiki/icons';

export const PageStatus = {
  1: {
    label: '正在处理',
    color: '#3248F2',
    bgcolor: '#EBEFFE',
  },
  2: {
    label: '已学习',
    color: '#82DDAF',
    bgcolor: '#F2FBF7',
  },
  3: {
    label: '处理失败',
    color: '#FE4545',
    bgcolor: '#FEECEC',
  },
};

export const PluginType = {
  1: '内置工具',
  2: '自定义工具',
};

export const IconMap = {
  'gpt-4o': 'icon-chatgpt',
  'deepseek-r1': 'icon-deepseek',
  'deepseek-v3-0324': 'icon-deepseek',
};

export const AppType = {
  1: {
    label: 'Wiki 网站',
    icon: IconAWebyingyong,
  },
  2: {
    label: '网页挂件',
    icon: IconWangyeguajian,
  },
  3: {
    label: '钉钉机器人',
    icon: IconDingdingjiqiren,
  },
  4: {
    label: '飞书机器人',
    icon: IconFeishujiqiren,
  },
  5: {
    label: '企业微信机器人',
    icon: IconQiyeweixinjiqiren,
  },
  6: {
    label: '企业微信客服',
    icon: IconQiyeweixinkefu,
  },
  7: {
    label: 'Discord 机器人',
    icon: IconADiscordjiqiren,
  },
  8: {
    label: '微信公众号',
    icon: IconWeixingongzhonghaoDaiyanse,
  },
  9: {
    label: '问答机器人 API',
    icon: IconWendajiqiren,
  },
  10: {
    label: '企业微信智能机器人',
    icon: IconQiyeweixinjiqiren,
  },
  11: {
    label: 'Lark 机器人',
    icon: IconFeishujiqiren,
  },
};

export const AnswerStatus = {
  1: '正在为您查找结果',
  2: '正在思考',
  3: '正在回答',
  4: '',
  5: '等待工具确认运行',
};

export const PageType = {
  1: '在线网页',
  2: '离线文件',
  3: '自定义文档',
};

export const VersionMap = {
  free: {
    label: '免费版',
    offlineFileSize: 5,
  },
  contributor: {
    label: '社区贡献者版',
    offlineFileSize: 10,
  },
  pro: {
    label: '专业版',
    offlineFileSize: 20,
  },
  business: {
    label: '商业版',
    offlineFileSize: 20,
  },
  enterprise: {
    label: '旗舰版',
    offlineFileSize: 20,
  },
};

export const ModelProvider = {
  BaiZhiCloud: {
    label: 'BaiZhiCloud',
    cn: '百智云',
    icon: IconBaizhiyunlogo,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: true,
    rerank: true,
    modelDocumentUrl: 'https://model-square.app.baizhi.cloud/token',
    defaultBaseUrl: 'https://model-square.app.baizhi.cloud/v1',
  },
  ZhiPu: {
    label: 'ZhiPu',
    cn: '智谱',
    icon: IconZhipuqingyan, // 需要添加对应的图标
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://docs.bigmodel.cn/',
    defaultBaseUrl: 'https://open.bigmodel.cn/api/paas/v4',
  },
  DeepSeek: {
    label: 'DeepSeek',
    cn: 'DeepSeek',
    icon: IconDeepseek,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://platform.deepseek.com/api-docs/',
    defaultBaseUrl: 'https://api.deepseek.com/v1',
  },
  Hunyuan: {
    label: 'Hunyuan',
    cn: '腾讯混元',
    icon: IconTengxunhunyuan,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://cloud.tencent.com/document/product/1729/111007',
    defaultBaseUrl: 'https://api.hunyuan.cloud.tencent.com/v1',
  },
  BaiLian: {
    label: 'BaiLian',
    cn: '阿里云百炼',
    icon: IconAliyunbailian,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl:
      'https://help.aliyun.com/zh/model-studio/getting-started/',
    defaultBaseUrl: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
  },
  Volcengine: {
    label: 'Volcengine',
    cn: '火山引擎',
    icon: IconHuoshanyinqing,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://www.volcengine.com/docs/82379/1182403',
    defaultBaseUrl: 'https://ark.cn-beijing.volces.com/api/v3',
  },
  OpenAI: {
    label: 'OpenAI',
    cn: 'OpenAI',
    icon: IconChatgpt,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://platform.openai.com/docs',
    defaultBaseUrl: 'https://api.openai.com/v1',
  },
  Ollama: {
    label: 'Ollama',
    cn: 'Ollama',
    icon: IconOllama,
    urlWrite: true,
    secretRequired: false,
    customHeader: true,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://github.com/ollama/ollama/tree/main/docs',
    defaultBaseUrl: 'http://127.0.0.1:11434',
  },
  SiliconFlow: {
    label: 'SiliconFlow',
    cn: '硅基流动',
    icon: IconAZiyuan2,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://docs.siliconflow.cn/',
    defaultBaseUrl: 'https://api.siliconflow.cn/v1',
  },
  Moonshot: {
    label: 'Moonshot',
    cn: '月之暗面',
    icon: IconKim,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://platform.moonshot.cn/docs/',
    defaultBaseUrl: 'https://api.moonshot.cn/v1',
  },
  AzureOpenAI: {
    label: 'AzureOpenAI',
    cn: 'Azure OpenAI',
    icon: IconAzure,
    urlWrite: true,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl:
      'https://learn.microsoft.com/en-us/azure/ai-services/openai/',
    defaultBaseUrl: 'https://<resource_name>.openai.azure.com',
  },
  Gemini: {
    label: 'Gemini',
    cn: 'Gemini',
    icon: IconGemini,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://ai.google.dev/gemini-api/docs',
    defaultBaseUrl: 'https://generativelanguage.googleapis.com',
  },
  Qiniu: {
    label: 'Qiniu',
    cn: '七牛云',
    icon: IconQiniuyun,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://developer.qiniu.com/aitokenapi',
    defaultBaseUrl: 'https://api.qnaigc.com/v1',
  },
  // NewAPI: {
  //   label: 'NewAPI',
  //   cn: 'New API',
  //   icon: 'icon-newapi',
  //   urlWrite: true,
  //   secretRequired: true,
  //   customHeader: false,
  //   modelDocumentUrl: '',
  //   defaultBaseUrl: 'http://localhost:3000/v1',
  // },
  // LMStudio: {
  //   label: 'LMStudio',
  //   cn: 'LM Studio',
  //   icon: 'icon-lmstudio',
  //   urlWrite: true,
  //   secretRequired: false,
  //   customHeader: false,
  //   modelDocumentUrl: '',
  //   defaultBaseUrl: 'http://localhost:1234/v1',
  // },
  // Anthropic: {
  //   label: 'Anthropic',
  //   cn: 'Anthropic',
  //   icon: 'icon-anthropic',
  //   urlWrite: false,
  //   secretRequired: true,
  //   customHeader: false,
  //   modelDocumentUrl: 'https://console.anthropic.com/account/keys',
  //   defaultBaseUrl: 'https://api.anthropic.com',
  // },
  // GitHub: {
  //   label: 'GitHub',
  //   cn: 'GitHub Models',
  //   icon: 'icon-github',
  //   urlWrite: false,
  //   secretRequired: true,
  //   customHeader: false,
  //   modelDocumentUrl: 'https://github.com/settings/tokens',
  //   defaultBaseUrl: 'https://models.github.ai/catalog',
  // },
  Xinference: {
    label: 'Xinference',
    cn: 'Xinference',
    icon: IconXinference,
    urlWrite: true,
    secretRequired: false,
    customHeader: false,
    chat: true,
    code: true,
    embedding: true,
    rerank: true,
    analysis: true,
    modelDocumentUrl:
      'https://inference.readthedocs.io/zh-cn/v1.2.0/getting_started/installation.html#installation',
    defaultBaseUrl: 'http://172.17.0.1:9997',
  },
  gpustack: {
    label: 'gpustack',
    cn: 'GPUStack',
    icon: IconGpustack,
    urlWrite: true,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: true,
    rerank: true,
    analysis: true,
    modelDocumentUrl: 'https://docs.gpustack.ai/latest/quickstart/',
    defaultBaseUrl: 'http://172.17.0.1',
  },
  Yi: {
    label: 'Yi',
    cn: '零一万物',
    icon: IconLingyiwanwu,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://platform.lingyiwanwu.com/docs',
    defaultBaseUrl: 'https://api.lingyiwanwu.com/v1',
  },
  // Baichuan: {
  //   label: 'Baichuan',
  //   cn: '百川智能',
  //   icon: 'icon-baichuan',
  //   urlWrite: false,
  //   secretRequired: true,
  //   customHeader: false,
  //   modelDocumentUrl: 'https://platform.baichuan-ai.com/console/apikey',
  //   defaultBaseUrl: 'https://api.baichuan-ai.com/v1',
  // },
  // Ph8: {
  //   label: 'Ph8',
  //   cn: 'PH8大模型开放平台',
  //   icon: 'icon-ph8',
  //   urlWrite: false,
  //   secretRequired: true,
  //   customHeader: false,
  //   modelDocumentUrl: '',
  //   defaultBaseUrl: 'https://ph8.co/v1',
  // },
  // MiniMax: {
  //   label: 'MiniMax',
  //   cn: 'MiniMax',
  //   icon: 'icon-minimax',
  //   urlWrite: false,
  //   secretRequired: true,
  //   customHeader: false,
  //   modelDocumentUrl: 'https://api.minimax.chat/user-center/basic-information/interface-key',
  //   defaultBaseUrl: 'https://api.minimaxi.com/v1',
  // },
  // Groq: {
  //   label: 'Groq',
  //   cn: 'Groq',
  //   icon: 'icon-groq',
  //   urlWrite: false,
  //   secretRequired: true,
  //   customHeader: false,
  //   modelDocumentUrl: 'https://console.groq.com/keys',
  //   defaultBaseUrl: 'https://api.groq.com/openai/v1',
  // },
  // Together: {
  //   label: 'Together',
  //   cn: 'Together',
  //   icon: 'icon-together',
  //   urlWrite: false,
  //   secretRequired: true,
  //   customHeader: false,
  //   modelDocumentUrl: 'https://api.together.xyz/settings/api-keys',
  //   defaultBaseUrl: 'https://api.together.xyz/v1',
  // },
  // Jina: {
  //   label: 'Jina',
  //   cn: 'Jina',
  //   icon: 'icon-hyperbolic',
  //   urlWrite: false,
  //   secretRequired: true,
  //   customHeader: false,
  //   modelDocumentUrl: '',
  //   defaultBaseUrl: 'https://api.jina.ai/v1',
  // },

  CTYun: {
    label: 'CTYun',
    cn: '天翼云息壤',
    icon: IconTianyiyun,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://www.ctyun.cn/products/ctxirang',
    defaultBaseUrl: 'https://wishub-x1.ctyun.cn/v1',
  },
  TencentTI: {
    label: 'TencentTI',
    cn: '腾讯云TI',
    icon: IconTengxunyun,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://cloud.tencent.com/document/product/1772',
    defaultBaseUrl: 'https://api.lkeap.cloud.tencent.com/v1',
  },
  BaiDuQianFan: {
    label: 'BaiDuQianFan',
    cn: '百度云千帆',
    icon: IconBaiduyun,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://cloud.baidu.com/doc/index.html',
    defaultBaseUrl: 'https://qianfan.baidubce.com/v2',
  },
  ModelScope: {
    label: 'ModelScope',
    cn: '魔搭社区',
    icon: IconModaGPT,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl:
      'https://modelscope.cn/docs/model-service/API-Inference/intro',
    defaultBaseUrl: 'https://api-inference.modelscope.cn/v1',
  },
  Infini: {
    label: 'Infini',
    cn: '无问芯穹',
    icon: IconInfini,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl:
      'https://docs.infini-ai.com/gen-studio/api/maas.html#/operations/chatCompletions',
    defaultBaseUrl: 'https://cloud.infini-ai.com/maas/v1',
  },
  StepFun: {
    label: 'StepFun',
    cn: '阶跃星辰',
    icon: IconStep,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://platform.stepfun.com/docs/overview/concept',
    defaultBaseUrl: 'https://api.stepfun.com/v1',
  },
  LanYun: {
    label: 'LanYun',
    cn: '蓝耘科技',
    icon: IconLanyun,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://archive.lanyun.net/#/maas/',
    defaultBaseUrl: 'https://maas-api.lanyun.net/v1',
  },
  AlayaNew: {
    label: 'AlayaNew',
    cn: '九章智算云',
    icon: IconAlayanew,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl:
      'https://docs.alayanew.com/docs/modelService/interview?utm_source=cherrystudio',
    defaultBaseUrl: 'https://deepseek.alayanew.com/v1',
  },
  PPIO: {
    label: 'PPIO',
    cn: '欧派云',
    icon: IconPpio,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl:
      'https://docs.cherry-ai.com/pre-basic/providers/ppio?invited_by=JYT9GD&utm_source=github_cherry-studio',
    defaultBaseUrl: 'https://api.ppinfra.com/v3/openai',
  },
  AiHubMix: {
    label: 'AiHubMix',
    cn: 'AiHubMix',
    icon: IconAihubmix,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://doc.aihubmix.com/',
    defaultBaseUrl: 'https://aihubmix.com/v1',
  },
  OcoolAI: {
    label: 'OcoolAI',
    cn: 'OcoolAI',
    icon: IconOcoolai,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://docs.ocoolai.com/',
    defaultBaseUrl: 'https://api.ocoolai.com/v1',
  },
  DMXAPI: {
    label: 'DMXAPI',
    cn: 'DMXAPI',
    icon: IconDMXAPI,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://dmxapi.cn/models.html#code-block',
    defaultBaseUrl: 'https://www.dmxapi.cn/v1',
  },
  BurnCloud: {
    label: 'BurnCloud',
    cn: 'BurnCloud',
    icon: IconBurncloud,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://ai.burncloud.com/docs',
    defaultBaseUrl: 'https://ai.burncloud.com/v1',
  },
  // Grok: {
  //   label: 'Grok',
  //   cn: 'Grok',
  //   icon: 'icon-grok',
  //   urlWrite: false,
  //   secretRequired: true,
  //   customHeader: false,
  //   modelDocumentUrl: 'https://docs.x.ai/',
  //   defaultBaseUrl: 'https://api.x.ai/v1',
  // },
  Nvidia: {
    label: 'Nvidia',
    cn: '英伟达',
    icon: IconYingweida,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://docs.api.nvidia.com/nim/reference/llm-apis',
    defaultBaseUrl: 'https://integrate.api.nvidia.com/v1',
  },
  TokenFlux: {
    label: 'TokenFlux',
    cn: 'TokenFlux',
    icon: IconTokenflux,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://tokenflux.ai/docs',
    defaultBaseUrl: 'https://tokenflux.ai/v1',
  },
  AI302: {
    label: 'AI302',
    cn: '302.AI',
    icon: IconA302ai,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://302ai.apifox.cn/api-147522039',
    defaultBaseUrl: 'https://api.302.ai/v1',
  },
  Cephalon: {
    label: 'Cephalon',
    cn: 'Cephalon',
    icon: IconCephalon,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://cephalon.cloud/apitoken/1864244127731589124',
    defaultBaseUrl: 'https://cephalon.cloud/user-center/v1/model',
  },
  OpenRouter: {
    label: 'OpenRouter',
    cn: 'OpenRouter',
    icon: IconOpenrouter,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://openrouter.ai/docs/quick-start',
    defaultBaseUrl: 'https://openrouter.ai/api/v1',
  },
  Fireworks: {
    label: 'Fireworks',
    cn: 'Fireworks',
    icon: IconFireworks,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: true,
    code: true,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://docs.fireworks.ai/getting-started/introduction',
    defaultBaseUrl: 'https://api.fireworks.ai/inference/v1',
  },
  Mistral: {
    label: 'Mistral',
    cn: 'Mistral',
    icon: IconMistral,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://docs.mistral.ai',
    defaultBaseUrl: 'https://api.mistral.ai/v1',
  },
  Perplexity: {
    label: 'Perplexity',
    cn: 'Perplexity',
    icon: IconPerplexity,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://docs.perplexity.ai/home',
    defaultBaseUrl: 'https://api.perplexity.ai',
  },
  Hyperbolic: {
    label: 'Hyperbolic',
    cn: 'Hyperbolic',
    icon: IconHyperbolic,
    urlWrite: false,
    secretRequired: true,
    customHeader: false,
    chat: false,
    code: false,
    embedding: false,
    rerank: false,
    modelDocumentUrl: 'https://docs.hyperbolic.xyz',
    defaultBaseUrl: 'https://api.hyperbolic.xyz/v1',
  },
  Other: {
    label: 'Other',
    cn: '其他',
    icon: IconAAIshezhi,
    urlWrite: true,
    secretRequired: true,
    customHeader: false,
    modelDocumentUrl: '',
    defaultBaseUrl: '',
  },
};

export const MAC_SYMBOLS = {
  ctrl: '⌘',
  alt: '⌥',
  shift: '⇧',
};

export const chartColor = [
  '#3082FF',
  '#FFD268',
  '#9E68FC',
  '#3248F2',
  '#63CFC3',
  '#FF5576',
];

export const FeedbackType = {
  1: '内容不准确',
  2: '没有帮助',
  3: '其他',
};

export const DocWidth = {
  full: {
    label: '全屏',
    value: 0,
  },
  wide: {
    label: '超宽',
    value: 1120,
  },
  normal: {
    label: '常规',
    value: 880,
  },
};
