package com.ss.android.ugc.aweme.compliance.privacy.settings.account.pages.following;

import X.AnonymousClass2GO;
import X.AnonymousClass2UX;
import X.C12422nK;
import X.C37193mB;
import X.C38983p4;
import X.C38993p5;
import X.C39433pn;
import X.C39453pp;
import X.C39563q0;
import X.M12;
import X.PgU;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.base.api.BaseResponse;
import com.ss.android.ugc.aweme.compliance.privacy.settings.account.pages.BasePrivacyUserSettingViewModel;
import kotlin.h.b.n;

public final class FollowingVisibilityViewModel extends BasePrivacyUserSettingViewModel implements AnonymousClass2GO {
    static {
        Covode.recordClassIndex(61728);
    }

    public final Integer LIZ(C38993p5 r2) {
        M12.LIZ(r2);
        C37193mB r0 = r2.LIZLLL;
        if (r0 != null) {
            return Integer.valueOf(r0.LIZ);
        }
        return null;
    }

    public final PgU<BaseResponse> LIZ(int i) {
        PgU<BaseResponse> LIZ = C39563q0.LIZ.setFollowList("following_list", i).LIZIZ(C39453pp.LIZ).LIZ(C39433pn.LIZ);
        n.LIZIZ(LIZ, "");
        return LIZ;
    }

    public final void LIZ(int i, BaseResponse baseResponse) {
        String str;
        M12.LIZ(baseResponse);
        super.LIZ(i, baseResponse);
        if (i != 1) {
            str = "me";
        } else if (C38983p4.LIZ.LIZIZ()) {
            str = "followers";
        } else {
            str = "everyone";
        }
        AnonymousClass2UX r2 = new AnonymousClass2UX();
        r2.LIZ("enter_from", "privacy_setting");
        r2.LIZ("to_status", str);
        C12422nK.LIZ("switch_following_list_setting", r2.LIZ);
    }

    public final void LIZ(C38993p5 r2, int i) {
        M12.LIZ(r2);
        C37193mB r0 = r2.LIZLLL;
        if (r0 != null) {
            r0.LIZ = i;
        }
    }
}
