import i18n from '@/i18n';
const { t } = i18n.global;

export const custom = () => {
  return {
    image: {
      icon: 'pic',
      upload: true,
      uploadPlace: t('common.upload') + t('common.image'),
      accept: `.jpg,.png`,
      multiple: true,
      name: t('common.image'),
      maxSize: 5 * 1024 * 1024,
      maxNum: 9,
      // othPlaceholder: '支持JPG、PNG图片格式，单张不超过5MB，最多支持上传9张。',
      othPlaceholder: t('tag.toolbox.metaImageTips', {
        form: 'jpg/png/gif',
        size: '5MB',
        maxlength: '9',
      }),
    },
    video: {
      icon: 'video',
      upload: true,
      uploadPlace: t('common.upload') + t('common.video'),
      accept: `.mp4, .mov`,
      multiple: false,
      name: t('common.video'),
      maxSize: 20 * 1024 * 1024,
      // othPlaceholder: '支持MP4、MOV视频格式，码率小于2Mbps,不超过20MB',
      othPlaceholder: t('tag.toolbox.metaVideoTips', {
        form: 'mp4/mov',
        size: '20MB',
        bit: '2Mbps',
      }),
    },
    audio: {
      icon: 'music',
      upload: true,
      uploadPlace: t('common.upload') + t('common.audio'),
      accept: '.mp3, .wav',
      multiple: false,
      name: t('common.audio'),
      maxSize: 5 * 1024 * 1024,
      // othPlaceholder: '支持MP3、WAV格式，不超过5MB',
      othPlaceholder: t('tag.toolbox.metaAudioTips', { form: 'mp3/wav', size: '5MB' }),
    },
    link: {
      icon: 'web',
      name: t('common.link'),
    },
    text: {
      icon: 'pic',
      upload: true,
      uploadPlace: t('common.upload') + t('common.image'),
      accept: `.jpg,.png`,
      multiple: true,
      name: t('common.image'),
      maxSize: 5 * 1024 * 1024,
      maxNum: 9,
      // othPlaceholder: '支持JPG、PNG图片格式，单张不超过5MB，最多支持上传9张。',
      othPlaceholder: t('tag.toolbox.metaImageTips', {
        form: 'jpg/png/gif',
        size: '5MB',
        maxlength: '9',
      }),
    },
  };
};
