import tool from '@/utils/tool'
import { required } from '@/utils/formRules'

export const officialAccountFormItems = [
	{
		label: '类型：',
		name: 'type',
		type: 'a-select',
		span: 8,
		attrs: {
			placeholder: '请选择类型',
			options: tool.dictList('OFFICIAL_ACCOUNT_TYPE')
		}
	},
	{
		label: '名称：',
		name: 'name',
		type: 'a-input',
		span: 8,
		rules: [required('请输入名称')],
		attrs: {
			placeholder: '请输入名称',
			allowClear: true
		}
	},
	{
		label: '可用状态：',
		name: 'enabledState',
		type: 'a-select',
		span: 8,
		attrs: {
			placeholder: '请选择可用状态',
			options: tool.dictList('COMMON_STATUS')
		},
		defaultValue: 'ENABLE'
	},
	{
		label: '备注：',
		name: 'remarks',
		type: 'a-textarea',
		span: 24,
		attrs: {
			placeholder: '请输入备注',
			allowClear: true
		}
	}
]

export const basicInfoFormItems = [
	{
		label: 'AppID：',
		name: 'appid',
		type: 'a-input',
		attrs: {
			placeholder: '请输入AppID',
			allowClear: true
		}
	},
	{
		label: 'AppSecret：',
		name: 'secret',
		type: 'a-input',
		attrs: {
			placeholder: '请输入AppSecret',
			allowClear: true
		}
	},
	{
		label: '字符串编码格式：',
		name: 'encodingFormat',
		type: 'a-input',
		attrs: {
			placeholder: '请输入字符串编码格式',
			allowClear: true
		}
	},
	{
		label: '校验码：',
		name: 'token',
		type: 'a-input',
		attrs: {
			placeholder: '请输入校验码',
			allowClear: true
		}
	},
	{
		label: '签名方式：',
		name: 'aesKey',
		type: 'a-input',
		attrs: {
			placeholder: '请输入签名方式',
			allowClear: true
		}
	}
]
