package com.ss.android.ugc.aweme.profile.editprofile.vm;

import X.0Bt;
import X.1Bn;
import X.7he;
import X.9HM;
import X.C0295Crj;
import X.C1446DZq;
import X.C1481DaP;
import X.DO2;
import X.DO4;
import X.DO5;
import X.DO8;
import X.Lea;
import X.LsC;
import X.M12;
import X.Mjy;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public final class ProfileEditProfileViewModel extends 0Bt {
    public static final DO4 LJIIIIZZ = new DO4((byte) 0);
    public final List<Integer> LIZ = new ArrayList();
    public final List<Integer> LIZIZ = new ArrayList();
    public final List<Integer> LIZJ = new ArrayList();
    public 1Bn<String> LIZLLL = new 1Bn<>();
    public 1Bn<List<Integer>> LJ = new 1Bn<>();
    public 1Bn<Boolean> LJFF = new 1Bn<>();
    public 1Bn<Boolean> LJI = new 1Bn<>();
    public final Mjy LJII;
    public final C0295Crj LJIIIZ = 7he.LIZ(DO2.LIZ);

    static {
        Covode.recordClassIndex(98548);
    }

    public final DO8 LIZ() {
        return (DO8) this.LJIIIZ.getValue();
    }

    public final String LIZ(List<Integer> list) {
        return Lea.LIZ(list, ",", "[", "]", 0, (CharSequence) null, (LsC) null, 56);
    }

    public ProfileEditProfileViewModel(Mjy mjy) {
        M12.LIZ(mjy);
        this.LJII = mjy;
    }

    public final void LIZ(C1446DZq dZq) {
        M12.LIZ(dZq);
        this.LIZ.clear();
        List<Integer> list = this.LIZ;
        List<C1481DaP> LIZJ2 = dZq.LIZLLL().LIZJ();
        ArrayList arrayList = new ArrayList(9HM.LIZ(LIZJ2, 10));
        for (C1481DaP daP : LIZJ2) {
            Objects.requireNonNull(daP, "null cannot be cast to non-null type com.ss.android.ugc.aweme.profile.editprofile.advancedfeatures.powerlist.ProfileAdvancedFeaturesItem");
            arrayList.add(Integer.valueOf(((DO5) daP).LIZ));
        }
        list.addAll(Lea.LJII(arrayList));
        if (this.LIZJ.isEmpty()) {
            this.LIZJ.addAll(this.LIZ);
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:104:0x0030 A[SYNTHETIC] */
    /* JADX WARNING: Removed duplicated region for block: B:66:0x010c  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final java.util.List<java.lang.Integer> LIZ(com.ss.android.ugc.aweme.profile.model.User r11) {
        /*
            r10 = this;
            X.M12.LIZ(r11)
            java.util.ArrayList r4 = new java.util.ArrayList
            r4.<init>()
            X.DNy[] r5 = X.C1142DNy.values()
            int r3 = r5.length
            r2 = 0
            r1 = 0
        L_0x000f:
            if (r1 >= r3) goto L_0x0119
            r9 = r5[r1]
            int r7 = r9.getId()
            X.DNy r0 = X.C1142DNy.LiveEvent
            int r0 = r0.getId()
            r8 = 0
            r6 = 1
            if (r7 != r0) goto L_0x0033
            X.M12.LIZ(r11)
            java.util.List r0 = r11.getLiveEventStructList()
            if (r0 == 0) goto L_0x0030
            boolean r0 = r0.isEmpty()
            if (r0 == 0) goto L_0x00d4
        L_0x0030:
            int r1 = r1 + 1
            goto L_0x000f
        L_0x0033:
            X.DNy r0 = X.C1142DNy.QA
            int r0 = r0.getId()
            if (r7 != r0) goto L_0x0043
            boolean r0 = X.4Of.LIZ(r11)
        L_0x003f:
            if (r0 == 0) goto L_0x0030
            goto L_0x00fe
        L_0x0043:
            X.DNy r0 = X.C1142DNy.Translations
            int r0 = r0.getId()
            if (r7 != r0) goto L_0x004f
            X.M12.LIZ(r11)
            goto L_0x0030
        L_0x004f:
            X.DNy r0 = X.C1142DNy.Supporting
            int r0 = r0.getId()
            if (r7 != r0) goto L_0x0098
            X.M12.LIZ(r11)
            X.DNV r0 = X.DNV.LIZ
            r0.LIZ()
            com.ss.android.ugc.aweme.profile.model.ProfileNgoStruct r0 = r11.getProfileNgoStruct()
            if (r0 == 0) goto L_0x0030
            com.ss.android.ugc.aweme.profile.model.ProfileNgoStruct r0 = r11.getProfileNgoStruct()
            if (r0 == 0) goto L_0x0030
            int r0 = r0.getId()
            java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
            if (r0 == 0) goto L_0x0030
            com.ss.android.ugc.aweme.profile.model.ProfileNgoStruct r0 = r11.getProfileNgoStruct()
            if (r0 == 0) goto L_0x0096
            java.lang.String r0 = r0.getIconUrl()
        L_0x007f:
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 != 0) goto L_0x0030
            com.ss.android.ugc.aweme.profile.model.ProfileNgoStruct r0 = r11.getProfileNgoStruct()
            if (r0 == 0) goto L_0x008f
            java.lang.String r8 = r0.getName()
        L_0x008f:
            boolean r0 = android.text.TextUtils.isEmpty(r8)
            if (r0 != 0) goto L_0x0030
            goto L_0x00fe
        L_0x0096:
            r0 = r8
            goto L_0x007f
        L_0x0098:
            X.DNy r0 = X.C1142DNy.Shoutouts
            int r0 = r0.getId()
            if (r7 != r0) goto L_0x00a5
            boolean r0 = X.4Of.LIZIZ(r11, r6)
            goto L_0x003f
        L_0x00a5:
            X.DNy r0 = X.C1142DNy.Tipping
            int r0 = r0.getId()
            if (r7 != r0) goto L_0x00b2
            boolean r0 = X.4Of.LIZ(r11, r6)
            goto L_0x003f
        L_0x00b2:
            X.DNy r0 = X.C1142DNy.GetLeads
            int r0 = r0.getId()
            if (r7 != r0) goto L_0x0030
            X.M12.LIZ(r11)
            X.3t7 r0 = r11.getBizAccountInfo()
            if (r0 == 0) goto L_0x0030
            X.DPc r0 = r0.getLeadsGenModel()
            if (r0 == 0) goto L_0x0030
            boolean r0 = r0.getHasLeadsGen()
            if (r0 != r6) goto L_0x0030
            boolean r0 = r11.isBlock
            if (r0 != 0) goto L_0x0030
            goto L_0x00fe
        L_0x00d4:
            boolean r0 = X.ESC.LIZLLL()
            if (r0 != 0) goto L_0x0030
            java.util.List r0 = r11.getLiveEventStructList()
            if (r0 == 0) goto L_0x0030
            java.lang.Object r0 = r0.get(r2)
            if (r0 == 0) goto L_0x0030
            java.util.List r0 = r11.getLiveEventStructList()
            if (r0 == 0) goto L_0x00f8
            java.lang.Object r0 = r0.get(r2)
            com.ss.android.ugc.aweme.profile.model.LiveEventStruct r0 = (com.ss.android.ugc.aweme.profile.model.LiveEventStruct) r0
            if (r0 == 0) goto L_0x00f8
            java.lang.String r8 = r0.getId()
        L_0x00f8:
            boolean r0 = android.text.TextUtils.isEmpty(r8)
            if (r0 != 0) goto L_0x0030
        L_0x00fe:
            int r0 = r9.getId()
            java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
            boolean r0 = r4.contains(r0)
            if (r0 != 0) goto L_0x0030
            int r0 = r9.getId()
            java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
            r4.add(r0)
            goto L_0x0030
        L_0x0119:
            java.util.List r0 = r11.getUserAdvancedFeaturesOrder()
            if (r0 != 0) goto L_0x0120
            return r4
        L_0x0120:
            java.util.ArrayList r3 = new java.util.ArrayList
            r3.<init>()
            java.util.Iterator r2 = r0.iterator()
        L_0x0129:
            boolean r0 = r2.hasNext()
            if (r0 == 0) goto L_0x0148
            java.lang.Object r1 = r2.next()
            boolean r0 = r4.contains(r1)
            if (r0 == 0) goto L_0x0129
            boolean r0 = r3.contains(r1)
            if (r0 != 0) goto L_0x0129
            java.lang.String r0 = ""
            kotlin.h.b.n.LIZIZ(r1, r0)
            r3.add(r1)
            goto L_0x0129
        L_0x0148:
            java.util.Iterator r2 = r4.iterator()
        L_0x014c:
            boolean r0 = r2.hasNext()
            if (r0 == 0) goto L_0x016e
            java.lang.Object r0 = r2.next()
            java.lang.Number r0 = (java.lang.Number) r0
            int r1 = r0.intValue()
            java.lang.Integer r0 = java.lang.Integer.valueOf(r1)
            boolean r0 = r3.contains(r0)
            if (r0 != 0) goto L_0x014c
            java.lang.Integer r0 = java.lang.Integer.valueOf(r1)
            r3.add(r0)
            goto L_0x014c
        L_0x016e:
            return r3
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.profile.editprofile.vm.ProfileEditProfileViewModel.LIZ(com.ss.android.ugc.aweme.profile.model.User):java.util.List");
    }
}
