import { TEMPLATE_TYPE } from './index'

const IS_LOCAL = process.env.NEXT_PUBLIC_LOCAL == 'true' // 单机版

export const BASE_URL =
    process.env.NODE_ENV === 'development' ? 'https://pre.weshop.com/api' : '/api'
export const WITH_CREDENTIALS = true
export const PAGE_LOGO = IS_LOCAL ? '/weshop_ai_logo.svg' : '/weshop_logo.svg' // 页面左上角logo
export const PAGE_TITLE = 'WeShop'
export const PAGE_FAVICON = '/small_logo.svg'
export const PAGE_PRIVACY = '/privacy.html' // 隐私页面链接
export const PAGE_TERM = '/terms.html' // 用户协议页面链接
export const PAGE_POLICY = '/policy.html' // 支付相关的协议页面链接
export const IMAGE_WATER_MASK = '/watermark-weshop.svg' // 水印照片
export const CDN_DOMAIN = 'https://ai-image.weshop.com/' // CDN前缀域名
export const MOBEIL_IMAGE = 'https://ai-image.weshop.com/20230713-143524.png' // 移动端显示图片
export const WORKSPACE_PHRASE = [
    '穿着碎花连衣裙的女孩走在东京街头',
    '胖胖的可爱小男孩在海边玩沙子',
    '一张豪华真皮沙发放置在酒店的大堂',
    '变形金刚玩具出现在火星基地',
]

export const WORKSPACE_CASEINFOS = [
    {
        title: '案例一：',
        content:
            '一位年轻的中国女性，蓬松的金色短发，纹身，高度细致的皮肤，逼真的细节眼睛，自然的皮肤纹理，自信的表情，时髦的嘻哈装扮，走在背景是城市废墟的室外，晴天，阳光，明亮，夏日午后，清晰对焦，高品质，iPhone拍摄，超逼真。',
    },
    {
        title: '案例二：',
        content:
            'A beautiful and elegant woman wearing a deep red V-neck dress is posing for a photo on a sailboat in front of a Hawaiian beach in the year 2020. The image should have a vintage film feel with a warm color tone and faded effect. The woman should be the main focus of the image, with the sailboat and beach in the background. Please use Artstation as a reference and include intricate details and hyperdetailed elements.',
    },
]

export const RETASK_BLOG_LINK = 'https://blog.weshop.com/post-811'

export const RETASK_BLOG_TEXT = '📕 复刻任务--套图功能教程'

export const HEAD_MENU = [
    {
        key: 'workstation',
        href: '/workspace',
    },
    {
        key: 'blog',
        href: 'https://waytoagi.feishu.cn/wiki/UqKXwX1d0iRO5ikBb0DcYyb9ned',
    },
]

export const SHOW_COMPUTER_POWER = !IS_LOCAL // 是否显示算力点相关
export const SHOW_BROADCASE = true // 是否显示广播
export const SHOW_WECHAT_ACCOUNT = !IS_LOCAL // 是否显示微信公众号
export const SHOW_WATER_MASK = !IS_LOCAL // 是否显示水印
export const IS_SUBMIT_TASK = !IS_LOCAL // 是否可以投稿
export const SHOW_BATCH_TASK = IS_LOCAL // 是否可以批量创建任务
export const WORKSPACE_TABS = IS_LOCAL ? ['star'] : ['star', 'showcase']
export const IS_ONLY_SHOW_STAR = IS_LOCAL
export const AGENT_LIST = IS_LOCAL
    ? [
          {
              key: 'image2image',
              icon: '/img2img.svg',
              bottom: true,
              floatIcon: '/icon_sd.svg',
          },
          {
              key: 'text2image',
              icon: '/txt2img.svg',
              bottom: true,
              floatIcon: '/icon_sd.svg',
          },
      ]
    : TEMPLATE_TYPE
export const IS_SHOW_GPU = IS_LOCAL // 是否显示GPU信息
export const LOG_URL =
    process.env.NODE_ENV === 'development' ? `${BASE_URL}/log` : 'https://www.weshop.com/api/log'
export const BROADCASE_URL = IS_LOCAL
    ? 'https://strapi.weshop.com/api/individual-notification'
    : 'https://strapi.weshop.com/api/pc-notification'

export const INIT_GOURP = IS_LOCAL ? 'image2image' : 'mannequin'

export const NETWORK_ERROR = '🔴 网络异常 🙅🏻‍♀️'
export const PREVIEW_WEBP = IS_LOCAL ? '' : '_preview.webp' // 复刻任务图片显示后缀
export const CLOUD_PROVIDE = IS_LOCAL ? '' : '算力由腾讯云提供'
export const POWER_DETAIL =  IS_LOCAL ? '执行明细' : '算力明细'
export const POWER_DETAIL_LIST =
    IS_LOCAL
        ? [
              {
                  key: 'checkPointCnt',
                  label: 'CHECKPOINT',
              },
              {
                  key: 'sdSamplingMethodCnt',
                  label: '采样方法',
              },
              {
                  key: 'posPromptCnt',
                  label: '正向咒语通配符',
              },
              {
                  key: 'totalExecuteCnt',
                  label: '总执行次数',
              },
          ]
        : [
              {
                  key: 'checkPointCnt',
                  label: 'CHECKPOINT',
              },
              {
                  key: 'sdSamplingMethodCnt',
                  label: '采样方法',
              },
              {
                  key: 'posPromptCnt',
                  label: '正向咒语通配符',
              },
              {
                  key: 'totalExecuteCnt',
                  label: '总执行次数',
              },
              {
                  key: 'perExecutePowerConsume',
                  label: '每次执行消耗算力',
                  powerNum: true,
              },
              {
                  key: 'totalExecutePowerConsume',
                  label: '本任务消耗算力',
                  powerNum: true,
              },
          ]
export const SECHEDUCLE_STRATEGY = [
    {
        key: 'balance',
        label: '正常执行',
    },
    {
        key: 'immediate',
        label: '插队执行',
    },
    {
        key: 'offPeak',
        label: '空闲执行',
    },
]
