package com.caliverse.admin.domain.RabbitMq;

import com.caliverse.admin.domain.RabbitMq.message.*;
import com.caliverse.admin.domain.entity.BlackList;
import com.caliverse.admin.domain.entity.SANCTIONS;
import com.caliverse.admin.domain.entity.SANCTIONSTYPE;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class RabbitMqUtils {
//    public static UserBlockReasonType getUserBlockSanctionName(SANCTIONS sanction){
//        switch (sanction){
//            case ACCOUNT_IMPERSONATION:
//                return UserBlockReasonType.UserBlockReasonType_Account_Impersonation;
//            case BAD_BEHAVIOR:
//                return UserBlockReasonType.UserBlockReasonType_Bad_Behavior;
//            case CASH_TRANSACTION:
//                return UserBlockReasonType.UserBlockReasonType_Cash_Transaction;
//            case ADMIN_IMPERSONATION:
//                return UserBlockReasonType.UserBlockReasonType_Asmin_Impersonation;
//            case BUG_ABUSE:
//                return UserBlockReasonType.UserBlockReasonType_Bug_Abuse;
//            case GAME_INTERFERENCE:
//                return UserBlockReasonType.UserBlockReasonType_Game_Interference;
//            case ILLEGAL_PROGRAM:
//                return UserBlockReasonType.UserBlockReasonType_Illegal_Program;
//            case INAPPROPRIATE_NAME:
//                return UserBlockReasonType.UserBlockReasonType_Inappropriate_Name;
//            case PERSONAL_INFO_LEAK:
//                return UserBlockReasonType.UserBlockReasonType_Personal_Info_Leak;
//            case SERVICE_INTERFERENCE:
//                return UserBlockReasonType.UserBlockReasonType_Service_Interference;
//        }
//        return null;
//    }
//
//    public static UserBlockPolicyType getUserBlockPolicyName(SANCTIONSTYPE sanctionstype){
//        switch (sanctionstype){
//            case ACCESS_RESTRICTIONS:
//                return UserBlockPolicyType.UserBlockPolicyType_Access_Restrictions;
//            case CHATTING_RESTRICTIONS:
//                return UserBlockPolicyType.UserBlockPolicyType_Chatting_Restrictions;
//        }
//        return null;
//    }

    public static AuthAdminLevelType getUserAdminLevelType(String type){
        switch (type){
            case "0":
                return AuthAdminLevelType.AuthAdminLevelType_None;
            case "1":
                return AuthAdminLevelType.AuthAdminLevelType_GmNormal;
            case "2":
                return AuthAdminLevelType.AuthAdminLevelType_GmSuper;
            case "3":
                return AuthAdminLevelType.AuthAdminLevelType_Developer;
        }
        return null;
    }
}
