export const Tasks = {
  img_to_img: 1,
  text_to_img: 2,
};

// 任务类型
export const TASKTYPE = {
  // 聊天
  CHAT: 1,
  // 绘图
  PAINTING: 2,
  // 视频
  VIDEO: 3,
  // 模特生成+换衣
  MODEL_GENERATION: 4,
  // 选择模特模板+换衣
  MODELTEMPLATE: 5,
};

// 模特换衣模块状态
export const ModelStatus = {
  wait: 1,
  upload: 2,
  loading: 3,
  success: 4,
  error: 5,
};

// 文案生成对话记录 本地的key
export const ConversationKey = 'custom_conversation';

// 图片生成页面要push一个生成数量
export const CustomNum = {
  name: '生成数量',
  lists: [
    {
      type: 'custom-number',
      label: '生成数量',
      name: 'number',
      value: null,
      span: 24,
      placeholder: '自定义',
      rules: [
        {
          type: 'required',
          message: '产品数量必填',
        },
      ],
    },
  ],
};
// form表单示例--文案
export const FormExample = [
  {
    name: '基础填写',
    lists: [
      {
        type: 'text',
        name: 'category_1',
        label: '产品类目',
        value: null,
        span: 24,
        placeholder: '产品类目',
        rules: [
          {
            type: 'required',
            message: '必填',
          },
        ],
      },
      {
        type: 'text',
        name: 'category_2',
        value: null,
        label: '产品关键词',
        span: 24,
        placeholder: '产品关键词',
        rules: [
          {
            type: 'required',
            message: '必填',
          },
        ],
      },
      // 下拉选择
      {
        type: 'select',
        placeholder: '选择产品名称',
        label: '产品名称',
        name: 'category_3',
        options: [
          {
            label: '充电器',
            value: '充电器',
          },
          {
            label: '衣服',
            value: '衣服',
          },
        ],
        //   可设置默认值
        value: '衣服',
        rules: [
          {
            type: 'required',
            message: '必填',
          },
        ],
      },
    ],
  },
  {
    name: '详细描述',
    lists: [
      {
        // 长文本输入框
        type: 'textarea',
        name: 'category_4',
        label: '产品描述',
        value: null,
        span: 24,
        maxRows: '5',
        minRows: '5',
        placeholder: '详细描述产品细节，生成的文案更加完美。',
        maxlength: 1000,
        rules: [
          {
            type: 'required',
            message: '必填',
          },
        ],
      },
    ],
  },
];

// form表单示例2-图片生成
export const FormExample2 = [
  {
    name: '基础填写',
    lists: [
      {
        type: 'text',
        name: 'category_1',
        label: '产品类目',
        value: null,
        span: 24,
        placeholder: '产品类目',
        rules: [
          {
            type: 'required',
            message: '产品类目必填',
          },
        ],
      },
      {
        type: 'text',
        name: 'category_2',
        label: '产品类型',
        value: null,
        span: 24,
        placeholder: '产品类型',
        rules: [
          {
            type: 'required',
            message: '产品类型必填',
          },
        ],
      },
    ],
  },
  {
    name: '画面描述',
    lists: [
      {
        // 长文本输入框
        type: 'textarea',
        name: 'category_3',
        label: '画面描述',
        value: null,
        span: 24,
        maxRows: '5',
        minRows: '5',
        placeholder:
          '画面描述以短句、短语为佳，高级设置内的参数会对图像生成有艺术修饰作用；支持中英文等语言输入',
        maxlength: 1000,
        rules: [
          {
            type: 'required',
            message: '画面描述必填',
          },
        ],
      },
    ],
  },
  //   图片尺寸
  {
    name: '图片尺寸',
    lists: [
      {
        // 单选按钮组
        type: 'radio_group_size',
        name: 'size_1',
        value: '1600x1600',
        span: 24,
        label: '图片尺寸',
        placeholder: '详细描述产品细节，生成的文案更加完美。',
        options: [
          {
            label: '亚马逊产品图尺寸',
            value: '1600x1600',
          },
          {
            label: '亚马逊a+主图',
            value: '600x180',
          },
          {
            type: 'custom',
            label: '自定义',
            value: '',
            value1: '',
            value2: '',
          },
        ],
        rules: [
          {
            type: 'required',
            message: '图片尺寸必选',
          },
        ],
      },
    ],
  },
  //   上传图片
  {
    name: '上传图片',
    lists: [
      {
        // 单选按钮组
        type: 'upload',
        name: 'image_1',
        label: '上传图片',
        value: null,
        span: 24,
        rules: [],
      },
    ],
  },
];
//
// 亚马逊模特生成+换衣  form表单示例
export const FormExample3 = [
  {
    name: '画面描述',
    lists: [
      {
        // 长文本输入框
        type: 'textarea',
        name: 'category_1',
        label: '画面描述',
        value: null,
        span: 24,
        maxRows: '5',
        minRows: '5',
        placeholder: '背景为白色',
        maxlength: 1000,
        rules: [
          {
            type: 'required',
            message: '画面描述必填',
          },
        ],
      },
    ],
  },
  //   图片尺寸
  {
    name: '图片尺寸',
    lists: [
      {
        // 单选按钮组
        type: 'radio_group_size',
        name: 'size_1',
        value: '1600x1600',
        span: 24,
        label: '图片尺寸',
        placeholder: '详细描述产品细节，生成的文案更加完美。',
        options: [
          {
            size: '1600x1600',
            label: '亚马逊产品图尺寸',
            value: '1600x1600',
          },
          {
            size: '600x180',
            label: '亚马逊a+主图',
            value: '600x180',
          },
          {
            type: 'custom',
            label: '自定义',
            value: '',
            value1: '',
            value2: '',
          },
        ],
        rules: [
          {
            type: 'required',
            message: '图片尺寸必选',
          },
        ],
      },
    ],
  },
];

// 模特模板选择+换衣
//   select_model 选择模特
//   local_upload 本地上传
export const FormExample4 = [
  {
    name: '模特样式',
    lists: [
      {
        // 选择模特弹窗
        type: 'select_model',
        name: 'model_1',
        label: '选择模特',
        value: '',
        span: 24,
        tool_url: 'http://ai-gpt.test/api/users/photo/search',
        dialog_title: '请选择一个模特',
        placeholder:
          '输入模特性别、区域、服装类别  “例如：女模特、亚洲、连衣裙”',
        dialog_visible: false,
        rules: [
          {
            type: 'required',
            message: '模特样式必选',
          },
        ],
      },
      {
        // 跳转到生成页面
        type: 'button',
        name: 'model_2',
        label: '模特生成',
        value: '',
        span: 24,
        tool_url: 'http://localhost:3008/ModelGeneration?id=5',
        dialog_title: '请选择一个模特',
        rules: [],
      },
      {
        type: 'text',
        name: 'sub_type',
        label: '类型',
        value: 'midJourney',
        span: 24,
        placeholder: '',
        is_hidden: true,
        rules: [
          {
            type: 'required',
            message: '类型不能为空',
          },
        ],
      },
    ],
  },
  //   图片尺寸
  {
    name: '图片尺寸',
    lists: [
      {
        // 单选按钮组
        type: 'radio_group_size',
        name: 'size',
        value: '1600x1600',
        span: 24,
        label: '图片尺寸',
        placeholder: '详细描述产品细节，生成的文案更加完美。',
        options: [
          {
            label: '亚马逊产品图尺寸',
            value: '1600x1600',
          },
          {
            label: '亚马逊a+主图',
            value: '600x180',
          },
          {
            type: 'custom',
            label: '自定义',
            value: '',
            value1: '',
            value2: '',
          },
        ],
        rules: [
          {
            type: 'required',
            message: '图片尺寸必选',
          },
        ],
      },
    ],
  },
  // 本地图片上传
  {
    name: '图片上传',
    lists: [
      {
        // 选择模特
        type: 'local_upload',
        name: 'local_upload',
        label: '图片上传',
        value: null,
        span: 24,
        rules: [
          {
            type: 'required',
            message: '图片必传',
          },
        ],
      },
    ],
  },
  {
    name: '自定义输入',
    lists: [
      {
        // 可自己添加
        type: 'label',
        name: 'label',
        label: '自定义输入',
        value: [],
        span: 24,
        rules: [
          {
            type: 'required',
            message: '至少输入一个',
          },
          {
            type: 'length',
            value: '20',
            message: '个数已达最大限制',
          },
        ],
      },
    ],
  },
];
