package cn.hanghui.outapi.platform.tenant.entity.enums;

import cn.hanghui.outapi.platform.common.utils.Preconditions;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum HhFaceFaceConfigEnum {

    TENANT("TENANT", "商户平台"),
    USER_LIB("USER_LIB", "用户库"),
    COLLECT_COUNTDOWN_TIME("COLLECT_COUNTDOWN_TIME", "采集页倒计时时间(5s-100s)"),
    IDENTIFY_TIMEOUT("IDENTIFY_TIMEOUT", "识别超时时间(3s-15s)"),
    VOICE_PLAY_SWITCH("VOICE_PLAY_SWITCH", "是否语音播报"),
    FACE_FOLLOW_BOX_SWITCH("FACE_FOLLOW_BOX_SWITCH", "是否显示人脸跟随框"),
    ENTRY_DETECTION_MAX_DISTANCE("ENTRY_DETECTION_MAX_DISTANCE", "进场检测最大距离(500mm-1200mm)"),
    IDENTIFY_DETECTION_MAX_DISTANCE("IDENTIFY_DETECTION_MAX_DISTANCE", "识别态最大检测距离(500mm-1200mm)"),
    IDENTIFY_MAX_DISTANCE("IDENTIFY_MAX_DISTANCE", "识别态最大识别距离(500mm-1200mm)"),
    SUNGLASSES_IDENTIFY_TIPS_SWITCH("SUNGLASSES_IDENTIFY_TIPS_SWITCH", "是否开启墨镜识别的文案提示"),
    HAT_IDENTIFY_TIPS_SWITCH("HAT_IDENTIFY_TIPS_SWITCH", "是否开启帽子识别的文案提示"),
    BANGS_IDENTIFY_TIPS_SWITCH("BANGS_IDENTIFY_TIPS_SWITCH", "是否开启刘海识别的文案提示"),
    MASK_IDENTIFY_TIPS_SWITCH("MASK_IDENTIFY_TIPS_SWITCH", "是否开启口罩识别的文案提示"),
    ;

    private String code;
    private String desc;

    public static HhFaceFaceConfigEnum findByCode(String code) {
        if (Preconditions.isBlank(code)) {
            return null;
        }
        for (HhFaceFaceConfigEnum enumObject : values()) {
            if (enumObject.code.equals(code)) {
                return enumObject;
            }
        }
        return null;
    }

}
