// Path: src/main/java/com/deswaef/twitch/exception/States.java
// public static void state(boolean state, String errorMessage) {
//     if (!state) {
//         throw new IllegalStateException(errorMessage);
//     }
// }


import static com.deswaef.twitch.exception.States.state;
    public static AuthorizationURLBuilder buildAuthorizationUrl() {
        return new AuthorizationURLBuilder();
    }

    public AuthorizationURLBuilder baseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
        return this;
    }

    public AuthorizationURLBuilder clientId(String clientId) {
        this.clientId = clientId;
        return this;
    }

    public AuthorizationURLBuilder redirectURI(String redirectURI) {
        this.redirectURI = redirectURI;
        return this;
    }

    public AuthorizationURLBuilder withScope(String scope) {
        if(this.scopes == null || scope.isEmpty()) {
            this.scopes = scope;
        } else {
            this.scopes += String.format("+%s", scope);
        }
        return this;
    }


    @Override
// Path: src/main/java/com/deswaef/twitch/exception/States.java
// public static void state(boolean state, String errorMessage) {
//     if (!state) {
//         throw new IllegalStateException(errorMessage);
//     }
// }


// Path: src/main/java/com/deswaef/twitch/util/AuthorizationURLBuilder.java
import static com.deswaef.twitch.exception.States.state;

    public static AuthorizationURLBuilder buildAuthorizationUrl() {
        return new AuthorizationURLBuilder();
    }

    public AuthorizationURLBuilder baseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
        return this;
    }

    public AuthorizationURLBuilder clientId(String clientId) {
        this.clientId = clientId;
        return this;
    }

    public AuthorizationURLBuilder redirectURI(String redirectURI) {
        this.redirectURI = redirectURI;
        return this;
    }

    public AuthorizationURLBuilder withScope(String scope) {
        if(this.scopes == null || scope.isEmpty()) {
            this.scopes = scope;
        } else {
            this.scopes += String.format("+%s", scope);
        }
        return this;
    }


    @Override
    public String toString() {