

export class ErrCode {
    static RT_SUCCESS = 0;
}

export class AuthStatus {
    static RequestAuth = 'RequestAuth';
    static CreateChannel = 'CreateChannel';
    static SelectNodes = 'SelectNodes';
    static StartAuth = 'StartAuth';
    static StartVerificationOfNodes = 'StartVerificationOfNodes';
    static CompleteVerificationOfNodes = 'CompleteVerificationOfNodes';
    static RequestCancel = 'RequestCancel';
    static AuthCanceled = 'AuthCanceled';
    static AuthFailed = 'AuthFailed';
    static AuthCompleted = 'AuthCompleted';

    static isFinish = (status) => {
        return (status === AuthStatus.AuthFailed) || (status === AuthStatus.AuthCanceled) || (status === AuthStatus.AuthCompleted);
    };

    static isProgress = (status) => {
        return !AuthStatus.isFinish(status);
    };

    static isSuccess = (status) => {
        return (status === AuthStatus.AuthCompleted);
    };
}


export class ResponseType {
    static Link = 'LINK';
    static CallBack = 'CALLBACK';
}
