package com.ss.android.ugc.aweme.following.ui.adapter;

import X.0CB;
import X.0CH;
import X.2cN;
import X.4ZZ;
import X.6Is;
import X.7he;
import X.BTB;
import X.C0295Crj;
import X.C1947Dhv;
import X.C1952Di0;
import X.C2058Dji;
import X.C2093DkH;
import X.C2094DkI;
import X.C2096DkK;
import X.C2099DkN;
import X.C2100DkO;
import X.C2105DkT;
import X.C2124Dkm;
import X.C4191Ed1;
import X.DMJ;
import X.DUS;
import X.DVE;
import X.E4R;
import X.H72;
import android.content.Context;
import android.util.TypedValue;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bytedance.covode.number.Covode;
import com.bytedance.jedi.arch.JediViewModel;
import com.bytedance.jedi.ext.adapter.internal.JediViewHolderProxy;
import com.ss.android.ugc.aweme.base.arch.JediBaseViewHolder;
import com.ss.android.ugc.aweme.following.ui.viewmodel.FollowRelationTabViewModel;
import com.ss.android.ugc.aweme.notificationlive.NotificationLiveViewModel;
import com.ss.android.ugc.aweme.user.repository.UserViewModel;
import kotlin.h.b.n;

public final class FollowListAdapter$FollowItemViewHolder extends JediBaseViewHolder<FollowListAdapter$FollowItemViewHolder, C2124Dkm> implements 6Is {
    public final BTB LJI;
    public final C4191Ed1 LJIIIZ;
    public final TextView LJIIJ;
    public final TextView LJIIJJI;
    public final E4R LJIIL;
    public final ImageView LJIILIIL;
    public final 4ZZ LJIILJJIL;
    public final DMJ LJIILL;
    public final View LJIILLIIL;
    public final Context LJIIZILJ;
    public final C0295Crj LJIJ;
    public final /* synthetic */ FollowListAdapter LJIJI;
    public final H72 LJIJJ;
    public final C0295Crj LJIJJLI;
    public final C0295Crj LJIL = 7he.LIZ(new C1952Di0(this));

    static {
        Covode.recordClassIndex(80881);
    }

    public final FollowRelationTabViewModel LJIIL() {
        return (FollowRelationTabViewModel) this.LJIJJLI.getValue();
    }

    public final C2058Dji LJIILJJIL() {
        return (C2058Dji) this.LJIL.getValue();
    }

    public final void onStateChanged(0CH r1, 0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public final void LJ() {
        super.LJ();
        2cN unused = subscribe(LJIILIIL(), DUS.LIZ(), new C1947Dhv(this));
        NotificationLiveViewModel LJIILLIIL2 = LJIILLIIL();
        String secUid = ((C2124Dkm) LJIIJJI()).LIZIZ.getSecUid();
        n.LIZIZ(secUid, "");
        LJIILLIIL2.LIZ(secUid);
        2cN unused2 = selectSubscribe(LJIILLIIL(), C2105DkT.LIZ, C2099DkN.LIZ, DUS.LIZ(), new C2094DkI(this));
    }

    public final void LJIILL() {
        TypedValue typedValue = new TypedValue();
        View view = this.itemView;
        n.LIZIZ(view, "");
        Context context = view.getContext();
        n.LIZIZ(context, "");
        context.getTheme().resolveAttribute(16843534, typedValue, true);
        this.itemView.setBackgroundResource(typedValue.resourceId);
    }

    private final NotificationLiveViewModel LJIILLIIL() {
        C2100DkO dkO = C2100DkO.LIZ;
        Class<NotificationLiveViewModel> cls = NotificationLiveViewModel.class;
        JediViewHolderProxy jediViewHolderProxy = this.LIZLLL;
        if (jediViewHolderProxy != null) {
            C2093DkH LIZ = C2093DkH.LIZ.LIZ(be_(), jediViewHolderProxy.LIZIZ());
            JediViewModel LIZ2 = LIZ.LIZ(getClass().getName() + '_' + cls.getName(), cls);
            DVE LIZ3 = LIZ2.LJIIJ.LIZ(NotificationLiveViewModel.class);
            if (LIZ3 != null) {
                LIZ3.binding(LIZ2);
            }
            LIZ2.a_(dkO);
            return (NotificationLiveViewModel) LIZ2;
        }
        throw new IllegalStateException("proxy not bound to viewHolder yet");
    }

    public final UserViewModel LJIILIIL() {
        C2096DkK dkK = new C2096DkK(this);
        Class<UserViewModel> cls = UserViewModel.class;
        JediViewHolderProxy jediViewHolderProxy = this.LIZLLL;
        if (jediViewHolderProxy != null) {
            C2093DkH LIZ = C2093DkH.LIZ.LIZ(be_(), jediViewHolderProxy.LIZIZ());
            JediViewModel LIZ2 = LIZ.LIZ(getClass().getName() + '_' + cls.getName(), cls);
            DVE LIZ3 = LIZ2.LJIIJ.LIZ(UserViewModel.class);
            if (LIZ3 != null) {
                LIZ3.binding(LIZ2);
            }
            LIZ2.a_(dkK);
            return (UserViewModel) LIZ2;
        }
        throw new IllegalStateException("proxy not bound to viewHolder yet");
    }

    public final void LIZ(int i) {
        if (i == 1) {
            this.LJIILJJIL.setIconRes(2131755207);
            this.LJIILJJIL.setTintColorRes(2130968673);
        } else if (i == 2) {
            this.LJIILJJIL.setIconRes(2131755206);
            this.LJIILJJIL.setTintColorRes(2130968673);
        } else if (i == 3) {
            this.LJIILJJIL.setIconRes(2131755209);
            this.LJIILJJIL.setTintColorRes(2130968673);
        }
    }

    /* JADX WARNING: Illegal instructions before constructor call */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public FollowListAdapter$FollowItemViewHolder(com.ss.android.ugc.aweme.following.ui.adapter.FollowListAdapter r7, android.view.ViewGroup r8) {
        /*
            r6 = this;
            X.M12.LIZ(r8)
            r6.LJIJI = r7
            android.content.Context r0 = r8.getContext()
            android.view.LayoutInflater r2 = android.view.LayoutInflater.from(r0)
            r1 = 2131560778(0x7f0d094a, float:1.8746938E38)
            r0 = 0
            android.view.View r0 = X.0HH.LIZ(r2, r1, r8, r0)
            java.lang.String r4 = ""
            kotlin.h.b.n.LIZIZ(r0, r4)
            r6.<init>(r0)
            r5 = 10908(0x2a9c, float:1.5285E-41)
            com.bytedance.frameworks.apm.trace.MethodCollector.i(r5)
            android.view.View r1 = r6.itemView
            r0 = 2131366297(0x7f0a1199, float:1.8352484E38)
            android.view.View r3 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r3, r4)
            X.BTB r3 = (X.BTB) r3
            r6.LJI = r3
            android.view.View r1 = r6.itemView
            r0 = 2131362537(0x7f0a02e9, float:1.8344857E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r4)
            X.Ed1 r0 = (X.C4191Ed1) r0
            r6.LJIIIZ = r0
            android.view.View r1 = r6.itemView
            r0 = 2131372538(0x7f0a29fa, float:1.8365142E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r4)
            android.widget.TextView r0 = (android.widget.TextView) r0
            r6.LJIIJ = r0
            android.view.View r1 = r6.itemView
            r0 = 2131372514(0x7f0a29e2, float:1.8365093E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r4)
            android.widget.TextView r0 = (android.widget.TextView) r0
            r6.LJIIJJI = r0
            android.view.View r1 = r6.itemView
            r0 = 2131369423(0x7f0a1dcf, float:1.8358824E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r4)
            X.E4R r0 = (X.E4R) r0
            r6.LJIIL = r0
            android.view.View r1 = r6.itemView
            r0 = 2131367709(0x7f0a171d, float:1.8355347E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r4)
            android.widget.ImageView r0 = (android.widget.ImageView) r0
            r6.LJIILIIL = r0
            android.view.View r1 = r6.itemView
            r0 = 2131362656(0x7f0a0360, float:1.8345099E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r4)
            X.4ZZ r0 = (X.4ZZ) r0
            r6.LJIILJJIL = r0
            android.view.View r1 = r6.itemView
            r0 = 2131372984(0x7f0a2bb8, float:1.8366046E38)
            android.view.View r2 = r1.findViewById(r0)
            X.H72 r2 = (X.H72) r2
            r6.LJIJJ = r2
            android.view.View r1 = r6.itemView
            r0 = 2131370741(0x7f0a22f5, float:1.8361497E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r4)
            X.DMJ r0 = (X.DMJ) r0
            r6.LJIILL = r0
            android.view.View r1 = r6.itemView
            r0 = 2131362534(0x7f0a02e6, float:1.8344851E38)
            android.view.View r0 = r1.findViewById(r0)
            kotlin.h.b.n.LIZIZ(r0, r4)
            r6.LJIILLIIL = r0
            android.view.View r0 = r6.itemView
            kotlin.h.b.n.LIZIZ(r0, r4)
            android.content.Context r0 = r0.getContext()
            r6.LJIIZILJ = r0
            java.lang.Class<com.ss.android.ugc.aweme.following.ui.viewmodel.FollowRelationTabViewModel> r1 = com.ss.android.ugc.aweme.following.ui.viewmodel.FollowRelationTabViewModel.class
            X.KEN r0 = X.KEM.LIZ
            X.D1G r1 = r0.LIZ(r1)
            X.BHO r0 = new X.BHO
            r0.<init>(r6, r1, r1)
            X.Crj r0 = X.7he.LIZ(r0)
            r6.LJIJJLI = r0
            java.lang.Class<com.ss.android.ugc.aweme.following.ui.viewmodel.FollowerRelationViewModel> r1 = com.ss.android.ugc.aweme.following.ui.viewmodel.FollowerRelationViewModel.class
            X.KEN r0 = X.KEM.LIZ
            X.D1G r1 = r0.LIZ(r1)
            X.BHP r0 = new X.BHP
            r0.<init>(r6, r1, r1)
            X.Crj r0 = X.7he.LIZ(r0)
            r6.LJIJ = r0
            X.Di0 r0 = new X.Di0
            r0.<init>(r6)
            X.Crj r0 = X.7he.LIZ(r0)
            r6.LJIL = r0
            kotlin.h.b.n.LIZIZ(r2, r4)
            android.view.ViewParent r0 = r2.getParent()
            if (r0 == 0) goto L_0x010f
            android.view.ViewGroup r0 = (android.view.ViewGroup) r0
            r0.removeView(r2)
            r0 = 1
            r3.addView(r2, r0)
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r5)
            return
        L_0x010f:
            java.lang.NullPointerException r1 = new java.lang.NullPointerException
            java.lang.String r0 = "null cannot be cast to non-null type android.view.ViewGroup"
            r1.<init>(r0)
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r5)
            throw r1
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.following.ui.adapter.FollowListAdapter$FollowItemViewHolder.<init>(com.ss.android.ugc.aweme.following.ui.adapter.FollowListAdapter, android.view.ViewGroup):void");
    }
}
