package com.facebook.login.widget;

import com.facebook.internal.LoginAuthorizationType;
import com.facebook.internal.Utility;
import com.facebook.login.DefaultAudience;
import com.facebook.login.LoginBehavior;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.Collections;
import java.util.List;

class LoginButton$LoginButtonProperties {
    private String authType = "rerequest";
    private LoginAuthorizationType authorizationType = null;
    private DefaultAudience defaultAudience = DefaultAudience.FRIENDS;
    private LoginBehavior loginBehavior = LoginBehavior.NATIVE_WITH_FALLBACK;
    private List<String> permissions = Collections.emptyList();

    LoginButton$LoginButtonProperties() {
        AppMethodBeat.i(92635);
        AppMethodBeat.o(92635);
    }

    public void setDefaultAudience(DefaultAudience defaultAudience) {
        this.defaultAudience = defaultAudience;
    }

    public DefaultAudience getDefaultAudience() {
        return this.defaultAudience;
    }

    public void setReadPermissions(List<String> list) {
        AppMethodBeat.i(92636);
        if (LoginAuthorizationType.PUBLISH.equals(this.authorizationType)) {
            UnsupportedOperationException unsupportedOperationException = new UnsupportedOperationException("Cannot call setReadPermissions after setPublishPermissions has been called.");
            AppMethodBeat.o(92636);
            throw unsupportedOperationException;
        }
        this.permissions = list;
        this.authorizationType = LoginAuthorizationType.READ;
        AppMethodBeat.o(92636);
    }

    public void setPublishPermissions(List<String> list) {
        AppMethodBeat.i(92637);
        if (LoginAuthorizationType.READ.equals(this.authorizationType)) {
            UnsupportedOperationException unsupportedOperationException = new UnsupportedOperationException("Cannot call setPublishPermissions after setReadPermissions has been called.");
            AppMethodBeat.o(92637);
            throw unsupportedOperationException;
        } else if (Utility.isNullOrEmpty(list)) {
            IllegalArgumentException illegalArgumentException = new IllegalArgumentException("Permissions for publish actions cannot be null or empty.");
            AppMethodBeat.o(92637);
            throw illegalArgumentException;
        } else {
            this.permissions = list;
            this.authorizationType = LoginAuthorizationType.PUBLISH;
            AppMethodBeat.o(92637);
        }
    }

    /* Access modifiers changed, original: 0000 */
    public List<String> getPermissions() {
        return this.permissions;
    }

    public void clearPermissions() {
        this.permissions = null;
        this.authorizationType = null;
    }

    public void setLoginBehavior(LoginBehavior loginBehavior) {
        this.loginBehavior = loginBehavior;
    }

    public LoginBehavior getLoginBehavior() {
        return this.loginBehavior;
    }

    public String getAuthType() {
        return this.authType;
    }

    public void setAuthType(String str) {
        this.authType = str;
    }
}
