package com.yuchen.saas.flow.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
 * 表单类型枚举
 */
@Getter
@AllArgsConstructor
public enum FormTypeEnum {
    /**
     *
     "title": "单行文本",
     FormInput
     "title": "下拉选择",
     FormSelect
     "title": "单项选择",
     FormRadio
     "title": "多项选择",
     FormCheckbox
     "title": "日期选择",
     FormDatePicker
     "title": "日期范围",
     FormDateRangePicker
     "title": "上传附件",
     FormUpload
     "title": "编码",
     FormEncode
     "title": "描述文字",
     FormDescription
     "title": "部门",
     FormDept
     "title": "成员",
     FormMember
     目前支持的控件条件选项
     ViewFormInput:==,contain(包含),notcontain(不包含),!=,empty(为空),notempty(不为空);
     ViewFormSelect:==,!=,empty,notempty;
     ViewFormRadio:==,!=,empty,notempty;
     ViewFormCheckbox:==,!=,contain,notcontain,empty,notempty;
     ViewFormDatePicker:==,>,<,!=,>=,<=,empty,notempty;
     ViewFormDescription:==,!=,contain,notcontain,empty,notempty;
     ViewFormMember:==,!=,empty,notempty;
     ViewFormDept:==,!=,empty,notempty,in(属于),notin(不属于);


     */

    INPUT("ViewFormInput","单行文本",""),
    SELECT("ViewFormSelect","下拉选选择",""),//todo
    SINGLE_SELECT("ViewFormRadio","单选",new ArrayList<>()),
    FORM_CHECK_BOX("ViewFormCheckbox","多项选择",new ArrayList<>()),//todo
    DATE_TIME("ViewFormDatePicker","日期时间",null),
    VIEW_FORM_DATE_RANGE_PICKER("ViewFormDateRangePicker","日期范围",null),//本期先不做
    TEXTAREA("ViewFormDescription","多行文本",""),
    SELECT_DEPT("ViewFormDept","部门",new ArrayList<>()),
    SELECT_USER("ViewFormMember","用户",new ArrayList<>()),

    NUMBER("Number","数字",null),
    DATE("Date","日期",null),
    LAYOUT("Layout","明细",null),
    TIME("Time","时间",null),
    MONEY("Money","金额",null),

    SELECT_MULTI_DEPT("SelectMultiDept","多部门",new ArrayList<>()),
    SELECT_MULTI_USER("SelectMultiUser","多用户",new ArrayList<>()),

    VIEW_FORM_CASCADING("ViewFormCascading","连级",null),
    ;





    private String type;

    private String name;
    private Object defaultValue;

}
