package com.alterdekim.game.component.game;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserCommandType {
    GetUserInitData("_I"),
    UserFriendsGet("_UFG"),
    UserFriendsRequests("_UFR"),
    GetClubMap("_CM"),
    GetFriendPanelData("_SNFP"),
    UpdateUserData("_D"),
    GetUserLocation("_LG"),
    GetUserLocationById("_LGI"),
    GetCatalogInfo("_GCI"),
    ChatMessage("_C"),
    Shoot("_NUS"),
    GetUserInfo("_UI"),
    GetUserAvatar("_AG"),
    SaveUserAvatarChanges("_AS"),
    GetUserUnlocks("_UUG"),
    GetOnlineUserFriends("_UFO"),
    RevokeUserFriendship("_UFD"),
    ApplyUserFriendship("_UFA"),
    GetSnInvitePanelData("_SNI"),
    GetGrantBlocks("_UGGB"),
    UseMagicAbility("_NUM"),
    SetDefaultUserPhone("_SDP"),
    SetUserBackground("_SDB"),
    QueryUserFriendship("_UFQ"),
    GetPhoneBalance("_DP"),
    PhoneMessage("_MP"),
    MarkPhoneMessageAsRead("_MPR"),
    DeletePhoneMessage("_MPD"),
    CardMessage("_MC"),
    MarkCardMessageAsRead("_MCR"),
    DeleteCardMessage("_MCD"),
    LockHouse("_LL"),
    BuyBatch("_BGB"),
    GetGame("_GG"),
    GameScore("_GS"),
    SendGameClose("_GC"),
    GameStatistics("_GT"),
    Unknown("");

    private final String value;

    public static UserCommandType fromString(String s) {
        for( UserCommandType t : values() ) {
            if( t.getValue().equals(s) ) return t;
        }
        return UserCommandType.Unknown;
    }
}
