import {
	FormItem,
	FormItemProperties,
	FormItemTypeEnum,
	FormValueType,
} from '@/components/form-render/form-render-types'
import { FormDesignerItem } from '../form-designer-types'
import XEUtils from 'xe-utils'

export const inputPropertiesForm: FormItem[] = [
	{
		type: FormItemTypeEnum.RADIO,
		group: 'form',
		config: {
			label: '控件大小',
			name: 'size',
		},
		properties: {
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '大',
					value: 'large',
				},
				{
					label: '中',
					value: 'default',
				},
				{
					label: '小',
					value: 'small',
				},
			],
			size: 'small',
			disabled: false,
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.RADIO,
		group: 'form',
		config: {
			label: '输入类型',
			name: 'type',
		},
		properties: {
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '文本',
					value: 'text',
				},
				{
					label: '邮箱',
					value: 'email',
				},
				{
					label: '颜色',
					value: 'color',
				},
				{
					label: '电话',
					value: 'tel',
				},
				{
					label: 'URL',
					value: 'url',
				},
			],
			size: 'small',
			disabled: false,
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '占位符',
			name: 'placeholder',
		},
		properties: {
			size: 'small',
			placeholder: '请输入表单占位符',
			disabled: false,
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.SWITCH,
		group: 'form',
		config: {
			label: '清除图标',
			name: 'allowClear',
		},
		properties: {
			checkedChildren: '显示',
			unCheckedChildren: '隐藏',
			size: 'small',
			disabled: false,
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.SWITCH,
		group: 'form',
		config: {
			label: '显示边框',
			name: 'bordered',
		},
		properties: {
			checkedChildren: '显示',
			unCheckedChildren: '隐藏',
			size: 'small',
			disabled: false,
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.SWITCH,
		group: 'form',
		config: {
			label: '展示字数',
			name: 'showCount',
		},
		properties: {
			checkedChildren: '显示',
			unCheckedChildren: '隐藏',
			size: 'small',
			disabled: false,
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT_NUMBER,
		group: 'form',
		config: {
			label: '最大长度',
			name: 'maxlength',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入最大长度',
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '默认值',
			name: 'defaultValue',
		},
		properties: {
			size: 'small',
			placeholder: '请输入默认值',
			disabled: false,
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '前置标签',
			name: 'addonBefore',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入前置标签',
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '后置标签',
			name: 'addonAfter',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入后置标签',
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '前缀图标',
			name: 'prefix',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入前缀图标',
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '后缀图标',
			name: 'suffix',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入后缀图标',
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.SWITCH,
		group: 'form',
		config: {
			label: '禁用状态',
			name: 'disabled',
		},
		properties: {
			checkedChildren: '开启',
			unCheckedChildren: '关闭',
			size: 'small',
			disabled: false,
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '输入框的 id',
			name: 'id',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入输入框的 id',
		},
		rules: [],
	},
]

const passwordForm = () => {
	const passwordForm = XEUtils.clone(inputPropertiesForm, true)
	passwordForm.splice(1, 1, {
		type: FormItemTypeEnum.SWITCH,
		group: 'form',
		config: {
			label: '是否显示切换按钮',
			name: 'visibilityToggle',
		},
		properties: {
			checkedChildren: '显示',
			unCheckedChildren: '隐藏',
			size: 'small',
			disabled: false,
		},
		rules: [],
	})
	return passwordForm
}

const textAreaForm = () => {
	const textAreaForm = XEUtils.clone(inputPropertiesForm, true)
	textAreaForm.splice(
		1,
		1,
		{
			type: FormItemTypeEnum.SWITCH,
			group: 'form',
			config: {
				label: '自适应内容高度',
				name: 'autoSize',
			},
			properties: {
				checkedChildren: '开启',
				unCheckedChildren: '关闭',
				size: 'small',
				disabled: false,
			},
			rules: [],
		},
		{
			type: FormItemTypeEnum.INPUT_NUMBER,
			group: 'form',
			config: {
				label: '最小行',
				name: 'minRows',
			},
			properties: {
				size: 'small',
				disabled: false,
			},
			rules: [],
		},
		{
			type: FormItemTypeEnum.INPUT_NUMBER,
			group: 'form',
			config: {
				label: '最大行',
				name: 'maxRows',
			},
			properties: {
				size: 'small',
				disabled: false,
			},
			rules: [],
		},
	)
	return textAreaForm
}

export const switchForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '开关大小',
			name: 'size',
		},
		properties: {
			optionType: 'button',
			buttonStyle: 'solid',
			size: 'small',
			options: [
				{
					label: '默认',
					value: 'default',
				},
				{
					label: '小',
					value: 'small',
				},
			],
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自动获取焦点',
			name: 'autofocus',
		},
		properties: { size: 'small' },
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '加载中',
			name: 'loading',
		},
		properties: { size: 'small' },
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选中时的内容',
			name: 'checkedChildren',
			help: '',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入选中时的内容',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '非选中时的内容',
			name: 'unCheckedChildren',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入非选中时的内容',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选中时的值',
			name: 'checkedValue',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入选中时的值',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '非选中时的值',
			name: 'unCheckedValue',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入非选中时的值',
		},
		rules: [],
	},
]
export const inputNumberForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '开关大小',
			name: 'size',
		},
		properties: {
			optionType: 'button',
			buttonStyle: 'solid',
			size: 'small',
			options: [
				{
					label: '大',
					value: 'large',
				},
				{
					label: '中',
					value: 'default',
				},
				{
					label: '小',
					value: 'small',
				},
			],
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '占位符',
			name: 'placeholder',
		},
		properties: {
			size: 'small',
			placeholder: '请输入表单占位符',
			disabled: false,
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT_NUMBER,
		group: 'form',
		config: {
			label: '最大值',
			name: 'max',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入最大值',
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT_NUMBER,
		group: 'form',
		config: {
			label: '最小值',
			name: 'min',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入最小值',
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT_NUMBER,
		group: 'form',
		config: {
			label: '数值精度',
			name: 'precision',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入数值精度',
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT_NUMBER,
		group: 'form',
		config: {
			label: '步长',
			name: 'step',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入步长',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '字符值模式',
			name: 'stringMode',
		},
		properties: { size: 'small' },
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '前置标签',
			name: 'addonBefore',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入前置标签',
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '后置标签',
			name: 'addonAfter',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入后置标签',
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '前缀图标',
			name: 'prefix',
		},
		properties: {
			size: 'small',
			disabled: false,
			placeholder: '请输入前缀图标',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自动获取焦点',
			name: 'autofocus',
		},
		properties: { size: 'small' },
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否有边框',
			name: 'bordered',
		},
		properties: { size: 'small' },
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否显示增减按钮',
			name: 'controls',
		},
		properties: { size: 'small' },
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否启用键盘快捷行为',
			name: 'keyboard',
		},
		properties: { size: 'small' },
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '小数点	',
			name: 'decimalSeparator',
			help: '',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入小数点',
		},
		rules: [],
	},
]

export const radioForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '开关大小',
			name: 'size',
		},
		properties: {
			optionType: 'button',
			buttonStyle: 'solid',
			size: 'small',
			options: [
				{
					label: '大',
					value: 'large',
				},
				{
					label: '中',
					value: 'default',
				},
				{
					label: '小',
					value: 'small',
				},
			],
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选项类型',
			name: 'optionType',
		},
		properties: {
			optionType: 'button',
			buttonStyle: 'solid',
			size: 'small',
			options: [
				{
					label: '默认',
					value: 'default',
				},
				{
					label: '按钮',
					value: 'button',
				},
			],
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选项按钮风格',
			name: 'buttonStyle',
		},
		properties: {
			optionType: 'button',
			buttonStyle: 'solid',
			size: 'small',
			options: [
				{
					label: '描边',
					value: 'outline',
				},
				{
					label: '填色',
					value: 'solid',
				},
			],
		},
		rules: [],
	},
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '表单 name 属性',
			name: 'name',
		},
		properties: {
			size: 'small',
			placeholder: '请输入表单 name 属性',
			disabled: false,
		},
		rules: [],
	},
]

export const autoCompleteForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '大小',
			name: 'size',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '大',
					value: 'large',
				},
				{
					label: '中',
					value: 'default',
				},
				{
					label: '小',
					value: 'small',
				},
			],
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '输入框提示',
			name: 'placeholder',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入输入框提示',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '支持清除',
			name: 'allowClear',
		},
		properties: {
			size: 'small',
			checkedChildren: '',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自动获取焦点',
			name: 'autofocus',
		},
		properties: {
			size: 'small',
			checkedChildren: '',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '使用键盘选择选项的时候把选中项回填到输入框中',
			name: 'backfill',
		},
		properties: {
			size: 'small',
			checkedChildren: '',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '默认高亮第一个选项',
			name: 'defaultActiveFirstOption',
		},
		properties: {
			size: 'small',
			checkedChildren: '',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '默认展开下拉菜单',
			name: 'defaultOpen',
		},
		properties: {
			size: 'small',
			checkedChildren: '',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '下拉菜单和选择器同宽',
			name: 'dropdownMatchSelectWidth',
		},
		properties: {
			size: 'small',
			checkedChildren: '',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '展开下拉菜单',
			name: 'open',
		},
		properties: {
			size: 'small',
			checkedChildren: '',
		},
		rules: [],
	},
]

export const mentionsForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '大小',
			name: 'size',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '大',
					value: 'large',
				},
				{
					label: '中',
					value: 'default',
				},
				{
					label: '小',
					value: 'small',
				},
			],
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '输入框提示',
			name: 'placeholder',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入输入框提示',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自动获取焦点',
			name: 'autofocus',
		},
		properties: {
			size: 'small',
			checkedChildren: '',
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '弹出层展示位置',
			name: 'placement',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '顶部',
					value: 'top',
				},
				{
					label: '底部',
					value: 'bottom',
				},
			],
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '触发关键字',
			name: 'prefix',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入触发关键字","分割',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选中项前后分隔符',
			name: 'split',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入选中项前后分隔符',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '下拉列表为空时显示的内容',
			name: 'notFoundContent',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入下拉列表为空时显示的内容',
		},
		rules: [],
	},
]

export const checkboxForm = [
	{
		type: FormItemTypeEnum.INPUT,
		group: 'form',
		config: {
			label: '表单 name 属性',
			name: 'name',
		},
		properties: {
			size: 'small',
			placeholder: '请输入表单 name 属性',
			disabled: false,
		},
		rules: [],
	},
]

export const selectForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '大小',
			name: 'size',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '大',
					value: 'large',
				},
				{
					label: '中',
					value: 'default',
				},
				{
					label: '小',
					value: 'small',
				},
			],
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '模式',
			name: 'mode',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '多选',
					value: 'multiple',
				},
				{
					label: '标签',
					value: 'tags',
				},
				{
					value: 'combobox',
					label: '组合',
				},
			],
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '最多显示多少个 tag',
			name: 'maxTagCount',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入最多显示多少个 tag',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '最大显示的 tag 文本长度',
			name: 'maxTagTextLength',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入最大显示的 tag 文本长度',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '下拉列表为空时显示的内容',
			name: 'notFoundContent',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入下拉列表为空时显示的内容',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '支持清除',
			name: 'allowClear',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否可搜索',
			name: 'showSearch',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选中项后清空搜索框',
			name: 'autoClearSearchValue',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '控制搜索文本',
			name: 'searchValue',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入控制搜索文本',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '搜索时过滤对应的 option 属性',
			name: 'optionFilterProp',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入搜索时过滤对应的 option 属性',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '默认获取焦点',
			name: 'autofocus',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否有边框',
			name: 'bordered',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选择框默认文字',
			name: 'placeholder',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入选择框默认文字',
		},
		rules: [],
	},

	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '默认高亮第一个选项',
			name: 'defaultActiveFirstOption',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '在 tags 和 multiple 模式下自动分词的分隔符',
			name: 'tokenSeparators',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入在 tags 和 multiple 模式下自动分词的分隔符',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否显示下拉小箭头',
			name: 'showArrow',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '默认展开下拉菜单',
			name: 'defaultOpen',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '回填到选择框的 Option 的属性值',
			name: 'optionLabelProp',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入回填到选择框的 Option 的属性值',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否展开下拉菜单',
			name: 'open',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '下拉菜单的 className 属性',
			name: 'dropdownClassName',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入下拉菜单的 className 属性',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '下拉菜单和选择器同宽',
			name: 'dropdownMatchSelectWidth',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '默认高亮的选项',
			name: 'firstActiveValue',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入默认高亮的选项',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选项的 label 包装到 value 中',
			name: 'labelInValue',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '弹窗滚动高度',
			name: 'listHeight',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入弹窗滚动高度',
		},
		rules: [],
	},
]

export const cascaderForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '大小',
			name: 'size',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '大',
					value: 'large',
				},
				{
					label: '中',
					value: 'default',
				},
				{
					label: '小',
					value: 'small',
				},
			],
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '设置搜索的值',
			name: 'searchValue',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入设置搜索的值',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '输入框占位文本',
			name: 'placeholder',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入输入框占位文本',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '支持多选节点',
			name: 'multiple',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '最多显示多少个 tag',
			name: 'maxTagCount',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入最多显示多少个 tag',
			min: 1,
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '浮层预设位置',
			name: 'placement',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '坐下',
					value: 'bottomLeft',
				},
				{
					label: '右下',
					value: 'bottomRight',
				},
				{
					value: 'topLeft',
					label: '左上',
				},
				{
					value: 'topRight',
					label: '右上',
				},
			],
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '浮层显隐',
			name: 'open',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '在选择框中显示搜索框',
			name: 'showSearch',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自动获取焦点',
			name: 'autofocus',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '点选每级菜单选项值都会发生变化',
			name: 'changeOnSelect',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否有边框',
			name: 'bordered',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '下拉列表为空时显示的内容',
			name: 'notFoundContent',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入自定义浮层类名',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自定义的选择框后缀图标',
			name: 'suffixIcon',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入自定义的选择框后缀图标',
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '次级菜单的展开方式',
			name: 'expandTrigger',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '点击',
					value: 'click',
				},
				{
					label: '悬停',
					value: 'hover',
				},
			],
		},
		rules: [],
	},
]

export const alterForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '警告提示的样式',
			name: 'type',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '成功',
					value: 'success',
				},
				{
					label: '提示',
					value: 'info',
				},
				{
					value: 'warning',
					label: '警告',
				},
				{
					value: 'error',
					label: '错误',
				},
			],
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '警告提示内容',
			name: 'message',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入警告提示内容',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '警告提示的辅助性文字介绍',
			name: 'description',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入警告提示的辅助性文字介绍',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否显示辅助图标',
			name: 'showIcon',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '显示关闭按钮',
			name: 'closable',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自定义关闭按钮文字',
			name: 'closeText',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入自定义关闭按钮文字',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否用作顶部公告',
			name: 'banner',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
]

export const dividerForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '类型',
			name: 'type',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '水平',
					value: 'horizontal',
				},
				{
					label: '垂直',
					value: 'vertical',
				},
			],
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否虚线',
			name: 'vertical',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '显示标题',
			name: 'showText',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '标题',
			name: 'text',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入分割线标题',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '标题是否显示为普通正文样式',
			name: 'plain',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '分割线标题的位置',
			name: 'orientation',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '左',
					value: 'left',
				},
				{
					label: '中',
					value: 'center',
				},
				{
					label: '右',
					value: 'right',
				},
			],
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '标题边距',
			name: 'orientationMargin',
		},
		properties: {
			size: 'small',
			controls: true,
			prefix: '',
			addonAfter: 'px',
		},
		rules: [],
	},
]

export const typographyFrom = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '类型',
			name: 'type',
		},
		properties: {
			size: 'default',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '非主要',
					value: 'secondary',
				},
				{
					label: '成功',
					value: 'success ',
				},
				{
					value: 'warning',
					label: '警告',
				},
				{
					value: 'danger',
					label: '危险',
				},
			],
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '内容',
			name: 'content',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入内容',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '添加代码样式',
			name: 'code',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否可拷贝',
			name: 'copyable',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '删除线样式',
			name: 'delete',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '禁用文本',
			name: 'disabled',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否可编辑',
			name: 'editable',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自动溢出省略',
			name: 'ellipsis',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '添加键盘样式',
			name: 'keyboard',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '添加标记样式',
			name: 'mark',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否加粗',
			name: 'strong',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '添加下划线样式',
			name: 'underline',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
]

export const spaceForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '方向',
			name: 'direction',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '垂直',
					value: 'vertical',
				},
				{
					label: '水平',
					value: 'horizontal',
				},
			],
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '大小',
			name: 'size',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '小',
					value: 'small',
				},
				{
					label: '中',
					value: 'middle',
				},
				{
					value: 'large',
					label: '大',
				},
				{
					value: 'number',
					label: '数值',
				},
			],
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '大小像素值',
			name: 'sizeInPx',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入大小像素值',
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '对齐',
			name: 'align',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '开始',
					value: 'start',
				},
				{
					label: '结尾',
					value: 'end',
				},
				{
					value: 'center',
					label: '居中',
				},
				{
					value: 'baseline',
					label: '基线',
				},
			],
		},
		rules: [],
	},
]

export const rateForm = [
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否允许再次点击后清除',
			name: 'allowClear',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否允许半选',
			name: 'allowHalf',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自动获取焦点',
			name: 'autofocus',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自定义字符',
			name: 'character',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入自定义字符',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: 'star 总数',
			name: 'count',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入star 总数',
			step: 1,
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '每项的提示信息',
			name: 'tooltips',
		},
		properties: {
			size: 'default',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入每项的提示信息,","分隔',
		},
		rules: [],
	},
]

export const sliderForm = [
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自动获取焦点',
			name: 'autofocus',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否只能拖拽到刻度上',
			name: 'dots',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '最大值',
			name: 'max',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入最大值',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '最小值',
			name: 'min',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入最小值',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '双滑块模式',
			name: 'range',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '反向坐标轴',
			name: 'reverse',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '步长',
			name: 'step',
		},
		properties: {
			size: 'default',
			controls: true,
			placeholder: '请输入步长',
			min: 1,
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '垂直方向',
			name: 'vertical',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
]

export const timePickerForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '大小',
			name: 'size',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '大',
					value: 'large',
				},
				{
					label: '中',
					value: 'default',
				},
				{
					value: 'small',
					label: '小',
				},
			],
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '绑定值的格式',
			name: 'valueFormat',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入绑定值的格式',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否展示清除按钮',
			name: 'allowClear',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自动获取焦点',
			name: 'autofocus',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否有边框',
			name: 'bordered',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '清除按钮的提示文案',
			name: 'clearText',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入清除按钮的提示文案',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '展示的时间格式',
			name: 'format',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入展示的时间格式',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '隐藏禁止选择的选项',
			name: 'hideDisabledOptions',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '小时选项间隔',
			name: 'hourStep',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入小时选项间隔',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '设置输入框为只读',
			name: 'inputReadOnly',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '分钟选项间隔',
			name: 'minuteStep',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入分钟选项间隔',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '没有值的时候显示的内容',
			name: 'placeholder',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入没有值的时候显示的内容',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '弹出层类名',
			name: 'popupClassName',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入弹出层类名',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '秒选项间隔',
			name: 'secondStep',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入秒选项间隔',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '面板是否显示“此刻”按钮',
			name: 'showNow',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '使用 12 小时制',
			name: 'use12Hours',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '绑定值的格式',
			name: 'valueFormat',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入绑定值的格式',
		},
		rules: [],
	},
]

export const timeRangePickerForm = () => {
	const timeRangePickerForm = XEUtils.clone(timePickerForm, true)
	timeRangePickerForm.splice(1, 0, {
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '始末时间是否自动排序',
			name: 'order',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	})
	return timeRangePickerForm
}

export const dateBaseForm = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '大小',
			name: 'size',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '大',
					value: 'large',
				},
				{
					label: '中',
					value: 'middle',
				},
				{
					value: 'small',
					label: '小',
				},
			],
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选择器类型',
			name: 'picker',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '日期',
					value: 'date',
				},
				{
					label: '星期',
					value: 'week',
				},
				{
					value: 'month',
					label: '月份',
				},
				{
					value: 'quarter',
					label: '季度',
				},
				{
					value: 'year',
					label: '年份',
				},
			],
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '日期面板状态',
			name: 'mode',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '日期',
					value: 'date',
				},
				{
					label: '时间',
					value: 'time',
				},
				{
					value: 'month',
					label: '月份',
				},
				{
					value: 'decade',
					label: '十年',
				},
				{
					value: 'year',
					label: '年份',
				},
			],
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '绑定值的格式',
			name: 'valueFormat',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入绑定值的格式',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否显示清除按钮',
			name: 'allowClear',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '自动获取焦点',
			name: 'autofocus',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否有边框',
			name: 'bordered',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '额外的弹出日历 className',
			name: 'dropdownClassName',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入额外的弹出日历 className',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '输入框为只读',
			name: 'inputReadOnly',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '弹层是否展开',
			name: 'open',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '输入框提示文字',
			name: 'placeholder',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入输入框提示文字',
		},
		rules: [],
	},
]
export const datePickerForm = () => {
	const datePickerForm = XEUtils.clone(dateBaseForm, true)
	datePickerForm.splice(
		1,
		0,
		{
			type: 'switch',
			group: 'form',
			config: {
				autoLink: true,
				hasFeedback: false,
				label: '面板是否显示“此刻”按钮',
				name: 'showNow',
			},
			properties: {
				size: 'small',
			},
			rules: [],
		},
		{
			type: 'switch',
			group: 'form',
			config: {
				autoLink: true,
				hasFeedback: false,
				label: '增加时间选择功能',
				name: 'showTime',
			},
			properties: {
				size: 'small',
			},
			rules: [],
		},
		{
			type: 'switch',
			group: 'form',
			config: {
				autoLink: true,
				hasFeedback: false,
				label: '是否展示“今天”按钮',
				name: 'showToday',
			},
			properties: {
				size: 'small',
			},
			rules: [],
		},
	)
	return datePickerForm
}
export const dateRangePickerForm = () => {
	const dateRangePickerForm = XEUtils.clone(dateBaseForm, true)
	dateRangePickerForm.splice(
		1,
		0,
		{
			group: 'form',
			type: 'input',
			config: {
				autoLink: true,
				hasFeedback: false,
				label: '分隔符',
				name: 'separator',
			},
			properties: {
				size: 'small',
				type: 'text',
				allowClear: true,
				bordered: true,
				showCount: true,
				placeholder: '请输入分隔符',
			},
			rules: [],
		},
		{
			type: 'switch',
			group: 'form',
			config: {
				autoLink: true,
				hasFeedback: false,
				label: '增加时间选择功能',
				name: 'showTime',
			},
			properties: {
				size: 'small',
			},
			rules: [],
		},
	)
	return dateRangePickerForm
}

export const uploadForm = [
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '接受上传的文件类型',
			name: 'accept',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入接受上传的文件类型',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '上传地址',
			name: 'action',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入上传地址',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '支持上传文件夹',
			name: 'directory',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '上传列表的内建样式',
			name: 'listType',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '文本',
					value: 'text',
				},
				{
					label: '图片',
					value: 'picture',
				},
				{
					value: 'picture-card',
					label: '卡片',
				},
			],
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '限制上传数量',
			name: 'maxCount',
		},
		properties: {
			size: 'small',
			controls: true,
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否支持多选文件',
			name: 'multiple',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '发到后台的文件参数名',
			name: 'name',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入发到后台的文件参数名',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '点击打开文件对话框',
			name: 'openFileDialogOnClick',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否展示 uploadList',
			name: 'showUploadList',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '支持服务端渲染',
			name: 'supportServerRender',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '上传请求时是否携带 cookie',
			name: 'withCredentials',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
]
export const transferForm = [
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '展示为单向样式',
			name: 'oneWay',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '操作文案集合',
			name: 'operations',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入操作文案集合,","分隔',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '使用分页样式',
			name: 'pagination',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否显示搜索框',
			name: 'showSearch',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '标题集合',
			name: 'titles',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入标题集合,","分隔',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否展示全选勾选框',
			name: 'showSelectAll',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
]
export const treeSelectFrom = [
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '大小',
			name: 'size',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '大',
					value: 'large',
				},
				{
					label: '中',
					value: 'default',
				},
				{
					label: '小',
					value: 'small',
				},
			],
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '显示清除按钮',
			name: 'allowClear',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '下拉菜单的 className 属性',
			name: 'dropdownClassName',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入下拉菜单的 className 属性',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '下拉菜单和选择器同宽',
			name: 'dropdownMatchSelectWidth',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否把每个选项的 label 包装到 value 中',
			name: 'labelInValue',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '弹窗滚动高度',
			name: 'listHeight',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入弹窗滚动高度',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '支持多选',
			name: 'multiple',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'input-number',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '最多显示多少个 tag',
			name: 'maxTagCount',
		},
		properties: {
			size: 'small',
			controls: true,
			placeholder: '请输入最多显示多少个 tag',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '下拉列表为空时显示的内容',
			name: 'notFoundContent',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入下拉列表为空时显示的内容',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选择框默认文字',
			name: 'placeholder',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入选择框默认文字',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '搜索框默认文字',
			name: 'searchPlaceholder',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入搜索框默认文字',
		},
		rules: [],
	},
	{
		type: 'radio',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '选中项回填的方式',
			name: 'showCheckedStrategy',
		},
		properties: {
			size: 'small',
			optionType: 'button',
			buttonStyle: 'solid',
			options: [
				{
					label: '所有',
					value: 'SHOW_ALL',
				},
				{
					label: '父节点',
					value: 'SHOW_PARENT',
				},
				{
					label: '子节点',
					value: 'SHOW_CHILD',
				},
			],
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '下拉中显示搜索框',
			name: 'showSearch',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '显示 checkbox',
			name: 'treeCheckable',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: 'checkable 状态下节点选择完全受控',
			name: 'treeCheckStrictly',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '默认展开所有树节点',
			name: 'treeDefaultExpandAll',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否展示 TreeNode title 前的图标',
			name: 'treeIcon',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '是否展示线条样式',
			name: 'treeLine',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '输入项过滤对应的 treeNode 属性',
			name: 'treeNodeFilterProp',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入输入项过滤对应的 treeNode 属性',
		},
		rules: [],
	},
	{
		group: 'form',
		type: 'input',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '显示的 prop 设置',
			name: 'treeNodeLabelProp',
		},
		properties: {
			size: 'small',
			type: 'text',
			allowClear: true,
			bordered: true,
			showCount: true,
			placeholder: '请输入显示的 prop 设置',
		},
		rules: [],
	},
	{
		type: 'switch',
		group: 'form',
		config: {
			autoLink: true,
			hasFeedback: false,
			label: '虚拟滚动',
			name: 'virtual',
		},
		properties: {
			size: 'small',
		},
		rules: [],
	},
]
export default [
	{
		type: 'input',
		name: '输入框', // 组件名称，用于左侧显示
		icon: 'icon-input', // 组件图标
		formItem: {
			group: 'form',
			type: FormItemTypeEnum.INPUT, // 组件名
			config: {
				label: '输入框', // 表单项名称
				name: 'input', // 表单字段名称
			},
			propertyConfigFormComponents: inputPropertiesForm,
			properties: {
				size: 'default',
				type: 'text',
				allowClear: true,
				bordered: true,
				showCount: true,
			},
			rules: [],
		},
	},
	{
		type: 'input-password',
		name: '密码框',
		icon: 'icon-password',
		formItem: {
			group: 'form',
			type: FormItemTypeEnum.INPUT_PASSWORD,
			config: {
				label: '密码框',
				name: 'input-password',
			},
			propertyConfigFormComponents: passwordForm(),
			properties: {
				size: 'default',
				visibilityToggle: true,
				allowClear: true,
				bordered: true,
				showCount: true,
			},
			rules: [],
		},
	},
	{
		type: 'textarea',
		name: '文本域',
		icon: 'icon-textarea',
		formItem: {
			type: FormItemTypeEnum.TEXTAREA,
			group: 'form',
			config: {
				label: '文本域',
				name: 'textarea',
			},
			propertyConfigFormComponents: textAreaForm(),
			hiddenFieldsFun: (data: Record<string, FormValueType>) => {
				return data['autoSize'] ? [] : ['minRows', 'maxRows']
			},
			propertiesTransfer: (data: FormItemProperties) => {
				if (data.autoSize) {
					data.autoSize = { minRows: data.minRows, maxRows: data.maxRows }
				}
				return data
			},
			properties: {
				size: 'default',
				visibilityToggle: true,
				allowClear: true,
				bordered: true,
				showCount: true,
				autoSize: true,
				minRows: 2,
				maxRows: 6,
			},
			rules: [],
		},
	},
	{
		type: 'upload',
		name: '上传',
		icon: 'icon-upload',
		formItem: {
			type: FormItemTypeEnum.UPLOAD,
			group: 'form',
			config: {
				label: '上传',
				name: 'upload',
			},
			propertyConfigFormComponents: uploadForm,
			properties: {
				action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76',
				headers: {
					authorization: 'authorization-text',
				},
				listType: 'text',
			},
			rules: [],
		},
	},
	{
		type: 'auto-complete',
		name: '自动完成',
		icon: 'icon-type-ahead',
		formItem: {
			type: FormItemTypeEnum.AUTO_COMPLETE,
			group: 'form',
			config: {
				label: '自动完成',
				name: 'auto-complete',
			},
			propertyConfigFormComponents: autoCompleteForm,
			properties: {
				size: 'default',
				options: [
					{ label: '选项1', value: '1' },
					{ label: '选项2', value: '2' },
				],
			},
			rules: [],
		},
	},
	{
		type: 'mentions',
		name: '提及',
		icon: 'icon-mention',
		formItem: {
			type: FormItemTypeEnum.MENTION,
			group: 'form',
			config: {
				label: '提及',
				name: 'mention',
			},
			propertyConfigFormComponents: mentionsForm,
			propertiesTransfer(value: FormItemProperties) {
				if (value.prefix && XEUtils.isString(value.prefix)) {
					value.prefix = value.prefix.split(',')
				}
				return value
			},
			properties: {
				size: 'default',
				options: [
					{ label: '选项1', value: '1' },
					{ label: '选项2', value: '2' },
				],
			},
			rules: [],
		},
	},
	{
		type: 'input-number',
		name: '数值框',
		icon: 'icon-number',
		formItem: {
			type: FormItemTypeEnum.INPUT_NUMBER,
			group: 'form',
			config: {
				label: '数值框',
				name: 'number',
			},
			propertyConfigFormComponents: inputNumberForm,
			properties: {
				size: 'default',
				controls: true,
			},
			rules: [],
		},
	},
	{
		type: 'switch',
		name: '开关',
		icon: 'icon-switch',
		formItem: {
			type: FormItemTypeEnum.SWITCH,
			group: 'form',
			config: {
				label: '开关',
				name: 'switch',
			},
			propertyConfigFormComponents: switchForm,
			properties: {
				size: 'default',
			},
			rules: [],
		},
	},
	{
		type: 'radio',
		name: '单选框',
		icon: 'icon-radio',
		formItem: {
			type: FormItemTypeEnum.RADIO,
			group: 'form',
			config: {
				label: '单选框',
				name: 'radio',
			},
			propertyConfigFormComponents: radioForm,
			hiddenFieldsFun: (data: Record<string, FormValueType>) => {
				return data['optionType'] === 'button' ? [] : ['buttonStyle']
			},
			properties: {
				size: 'default',
				optionType: 'button',
				buttonStyle: 'solid',
				options: [
					{ label: '选项1', value: '1' },
					{ label: '选项2', value: '2' },
				],
			},
			rules: [],
		},
	},
	{
		type: 'checkbox',
		name: '多选框',
		icon: 'icon-checkbox',
		formItem: {
			type: FormItemTypeEnum.CHECKBOX,
			group: 'form',
			config: {
				label: '多选框',
				name: 'checkbox',
			},
			propertyConfigFormComponents: checkboxForm,
			properties: {
				options: [
					{ label: '选项1', value: '1' },
					{ label: '选项2', value: '2' },
				],
			},
			rules: [],
		},
	},
	{
		type: 'select',
		name: '下拉框',
		icon: 'icon-select',
		formItem: {
			type: FormItemTypeEnum.SELECT,
			group: 'form',
			config: {
				label: '下拉框',
				name: 'select',
			},
			propertyConfigFormComponents: selectForm,
			propertiesTransfer(value: FormItemProperties) {
				if (value.firstActiveValue && XEUtils.isString(value.firstActiveValue)) {
					value.firstActiveValue = value.firstActiveValue.split(',')
				}
				if (value.tokenSeparators && XEUtils.isString(value.tokenSeparators)) {
					value.tokenSeparators = value.tokenSeparators.split(',')
				}
				return value
			},
			hiddenFieldsFun(value: Record<string, FormValueType>) {
				return [
					...(value.showSearch ? [] : ['searchValue', 'optionFilterProp', 'autoClearSearchValue']),
					...(value.mode === 'tags' ? [] : ['maxTagCount', 'maxTagTextLength']),
				]
			},
			properties: {
				size: 'default',
				allowClear: false,
				autoClearSearchValue: true,
				autofocus: false,
				bordered: true,
				defaultActiveFirstOption: true,
				dropdownMatchSelectWidth: true,
				labelInValue: false,
				showSearch: false,
				options: [
					{ label: '选项1', value: '1' },
					{ label: '选项2', value: '2' },
				],
			},
			rules: [],
		},
	},
	{
		type: 'cascader',
		name: '级联',
		icon: 'icon-cascader',
		formItem: {
			type: FormItemTypeEnum.CASCADER,
			group: 'form',
			config: {
				label: '级联',
				name: 'cascader',
			},
			propertyConfigFormComponents: cascaderForm,
			properties: {
				size: 'default',
				options: [
					{
						label: '大',
						value: 'large',
						children: [
							{
								label: '大1',
								value: 'large1',
							},
							{
								label: '中1',
								value: 'default1',
							},
							{
								label: '小1',
								value: 'small1',
							},
						],
					},
					{
						label: '中',
						value: 'default',
					},
					{
						label: '小',
						value: 'small',
					},
				],
			},
			rules: [],
		},
	},
	{
		type: 'transfer',
		name: '穿梭框',
		icon: 'icon-transfer',
		formItem: {
			type: FormItemTypeEnum.TRANSFER,
			group: 'form',
			config: {
				label: '穿梭框',
				name: 'transfer',
			},
			propertyConfigFormComponents: transferForm,
			properties: {
				dataSource: [
					{
						key: '1',
						title: '选项1',
						description: '选项1描述',
					},
				],
				showSearch: true,
			},
			rules: [],
		},
	},
	{
		type: 'tree-select',
		name: '树选择',
		icon: 'icon-tree',
		formItem: {
			type: FormItemTypeEnum.TREE_SELECT,
			group: 'form',
			config: {
				label: '树选择',
				name: 'tree',
			},
			propertyConfigFormComponents: treeSelectFrom,
			properties: {
				size: 'default',
				treeData: [
					{
						label: 'parent 1',
						value: 'parent 1',
						key: '1',
						children: [
							{
								label: 'parent 1-0',
								value: 'parent 1-0',
								key: '1',
								children: [
									{
										label: 'my leaf',
										value: 'leaf1',
										key: '1',
									},
									{
										label: 'your leaf',
										value: 'leaf2',
										key: '3',
									},
								],
							},
							{
								label: 'parent 1-1',
								value: 'parent 1-1',
								key: '1',
							},
						],
					},
				],
			},
			rules: [],
		},
	},
	{
		type: 'rate',
		name: '评分',
		icon: 'icon-star',
		formItem: {
			type: FormItemTypeEnum.RATE,
			group: 'form',
			config: {
				label: '评分',
				name: 'rate',
			},
			propertyConfigFormComponents: rateForm,
			propertiesTransfer(value: FormItemProperties) {
				if (value.tooltips && XEUtils.isString(value.tooltips)) value.tooltips = value.tooltips.split(',')
				return value
			},
			properties: {
				allowClear: true,
				allowHalf: false,
				autofocus: false,
				count: 5,
			},
			rules: [],
		},
	},
	{
		type: 'slider',
		name: '滑动',
		icon: 'icon-slider',
		formItem: {
			type: FormItemTypeEnum.SLIDER,
			group: 'form',
			config: {
				label: '滑动',
				name: 'slider',
			},
			propertyConfigFormComponents: sliderForm,
			properties: { dots: false },
			rules: [],
		},
	},
	{
		type: 'time-picker',
		name: '时间',
		icon: 'icon-clock',
		formItem: {
			type: FormItemTypeEnum.TIME_PICKER,
			group: 'form',
			config: {
				label: '时间',
				name: 'time',
			},
			propertyConfigFormComponents: timePickerForm,
			properties: {
				size: 'default',
				valueFormat: 'HH:mm:ss',
			},
			rules: [],
		},
	},
	{
		type: 'time-range-picker',
		name: '时间范围',
		icon: 'icon-clock',
		formItem: {
			type: FormItemTypeEnum.TIME_RANGE_PICKER,
			group: 'form',
			config: {
				label: '时间范围',
				name: 'time-range',
			},
			propertyConfigFormComponents: timeRangePickerForm(),
			properties: {
				size: 'default',
				valueFormat: 'HH:mm:ss',
			},
			rules: [],
		},
	},
	{
		type: 'date-picker',
		name: '日期',
		icon: 'icon-calendar',
		formItem: {
			type: FormItemTypeEnum.DATE_PICKER,
			group: 'form',
			config: {
				label: '日期',
				name: 'calendar',
			},
			propertyConfigFormComponents: datePickerForm(),
			properties: {
				size: 'middle',
				picker: 'date',
				valueFormat: 'YYYY-MM-DD',
			},
			rules: [],
		},
	},
	{
		type: 'range-picker',
		name: '日期范围',
		icon: 'icon-date_range',
		formItem: {
			type: FormItemTypeEnum.RANGE_PICKER,
			group: 'form',
			config: {
				label: '日期范围',
				name: 'range-picker',
			},
			propertyConfigFormComponents: dateRangePickerForm(),
			properties: { size: 'middle', picker: 'date', valueFormat: 'YYYY-MM-DD' },
			rules: [],
		},
	},
	{
		type: 'alert',
		name: '警告提示',
		icon: 'icon-info',
		formItem: {
			type: FormItemTypeEnum.ALERT,
			group: 'auxiliary',
			propertyConfigFormComponents: alterForm,
			properties: {
				type: 'info',
				showIcon: true,
				message: '提示',
				description: '提示内容',
			},
		},
	},
	{
		type: 'typography',
		name: '文字',
		icon: 'icon-text',
		formItem: {
			type: FormItemTypeEnum.TYPOGRAPHY_TEXT,
			group: 'auxiliary',
			propertyConfigFormComponents: typographyFrom,
			properties: {
				content: '文本内容',
			},
		},
	},
	{
		type: 'divider',
		name: '分割线',
		icon: 'icon-divider',
		formItem: {
			type: FormItemTypeEnum.DIVIDER,
			group: 'auxiliary',
			propertyConfigFormComponents: dividerForm,
			hiddenFieldsFun(value: Record<string, FormValueType>) {
				return value.showText ? [] : ['text', 'plain', 'orientation', 'orientationMargin']
			},
			properties: {
				showText: true,
				type: 'horizontal',
				orientation: 'left',
			},
		},
	},
	{
		type: 'space',
		name: '空白',
		icon: 'icon-space',
		formItem: {
			type: FormItemTypeEnum.SPACE,
			group: 'auxiliary',
			propertyConfigFormComponents: spaceForm,
			hiddenFieldsFun(value: Record<string, FormValueType>) {
				return value.size === 'number' ? [] : ['sizeInPx']
			},
			propertiesTransfer(value: FormItemProperties) {
				if (value.size === 'number') value.size = Number(value.sizeInPx)
				return value
			},
			properties: {
				size: 'small',
				direction: 'horizontal',
			},
		},
	},
	{
		type: 'row',
		name: '行',
		icon: 'icon-rows',
		formItem: {
			type: FormItemTypeEnum.ROW,
			group: 'layout',
			propertyConfigFormComponents: [
				{
					type: 'radio',
					group: 'form',
					config: {
						autoLink: true,
						hasFeedback: false,
						label: '垂直对齐',
						name: 'align',
					},
					properties: {
						size: 'small',
						optionType: 'button',
						buttonStyle: 'solid',
						options: [
							{
								label: 'top',
								value: 'top',
							},
							{
								label: 'middle',
								value: 'middle',
							},
							{
								value: 'bottom',
								label: 'bottom',
							},
							{
								value: 'stretch',
								label: 'stretch',
							},
						],
					},
					rules: [],
				},
				{
					type: 'radio',
					group: 'form',
					config: {
						autoLink: true,
						hasFeedback: false,
						label: '水平排列',
						name: 'justify',
					},
					properties: {
						size: 'small',
						optionType: 'button',
						buttonStyle: 'solid',
						options: [
							{
								label: 'start',
								value: 'start',
							},
							{
								label: 'end',
								value: 'end',
							},
							{
								value: 'center',
								label: 'center',
							},
							{
								value: 'space-around',
								label: 'space-around',
							},
							{
								value: 'space-between',
								label: 'space-between',
							},
							{
								label: 'space-evenly',
								value: 'space-evenly',
							},
						],
					},
					rules: [],
				},
				{
					type: 'input-number',
					group: 'form',
					config: {
						autoLink: true,
						hasFeedback: false,
						label: '栅格间隔',
						name: 'gutter',
					},
					properties: {
						size: 'small',
						controls: true,
						placeholder: '请输入栅格间隔',
					},
					rules: [],
				},
				{
					type: 'switch',
					group: 'form',
					config: {
						autoLink: true,
						hasFeedback: false,
						label: '是否自动换行',
						name: 'wrap',
					},
					properties: {
						size: 'small',
					},
					rules: [],
				},
			],
			properties: {
				align: 'top',
				gutter: 0,
				justify: 'start',
				wrap: true,
			},
		},
		children: [],
	},
	{
		type: 'col',
		name: '列',
		icon: 'icon-columns',
		formItem: {
			type: FormItemTypeEnum.COL,
			group: 'layout',
			propertyConfigFormComponents: [
				{
					type: 'input-number',
					group: 'form',
					config: {
						autoLink: true,
						hasFeedback: false,
						label: '栅格占位格数',
						name: 'span',
					},
					properties: {
						size: 'small',
						controls: true,
						placeholder: '请输入栅格占位格数',
						max: 24,
						min: 1,
					},
					rules: [],
				},
				{
					type: 'input-number',
					group: 'form',
					config: {
						autoLink: true,
						hasFeedback: false,
						label: '栅格向右移动格数',
						name: 'push',
					},
					properties: {
						size: 'small',
						controls: true,
						placeholder: '请输入栅格向右移动格数',
						max: 24,
						min: 0,
					},
					rules: [],
				},
				{
					type: 'input-number',
					group: 'form',
					config: {
						autoLink: true,
						hasFeedback: false,
						label: '栅格向左移动格数',
						name: 'pull',
					},
					properties: {
						size: 'small',
						controls: true,
						placeholder: '请输入栅格向左移动格数',
						max: 24,
						min: 0,
					},
					rules: [],
				},
				{
					type: 'input-number',
					group: 'form',
					config: {
						autoLink: true,
						hasFeedback: false,
						label: '栅格左侧的间隔格数',
						name: 'offset',
					},
					properties: {
						size: 'small',
						controls: true,
						placeholder: '请输入栅格左侧的间隔格数',
						max: 24,
						min: 0,
					},
					rules: [],
				},
				{
					group: 'form',
					type: 'input',
					config: {
						autoLink: true,
						hasFeedback: false,
						label: 'flex 布局填充',
						name: 'flex',
					},
					properties: {
						size: 'small',
						type: 'text',
						allowClear: true,
						bordered: true,
						showCount: true,
						placeholder: '请输入flex 布局填充',
					},
					rules: [],
				},
				{
					type: 'input-number',
					group: 'form',
					config: {
						autoLink: true,
						hasFeedback: false,
						label: '栅格顺序',
						name: 'order',
					},
					properties: {
						size: 'small',
						controls: true,
						placeholder: '请输入栅格顺序',
					},
					rules: [],
				},
			],
			properties: {
				offset: 0,
				order: 0,
				pull: 0,
				push: 0,
				span: 12,
			},
		},
		children: [],
	},
].map((item) => XEUtils.assign(item, { uuid: XEUtils.uniqueId() } as FormDesignerItem)) as FormDesignerItem[]
