package com.ss.android.ugc.aweme.relation.fp;

import X.1hK;
import X.2uR;
import X.3c7;
import X.3cA;
import X.3cC;
import X.3cI;
import X.A7H;
import X.AoK;
import X.C0314Csc;
import X.C0330Css;
import X.C3059Dzr;
import X.C3982EZe;
import X.C4003EZz;
import X.C5566EzC;
import X.C5689F2v;
import X.C5691F2x;
import X.CZv;
import X.EZL;
import X.F35;
import X.F3A;
import X.KEM;
import X.Ls2;
import X.M12;
import android.util.SparseArray;
import android.view.View;
import android.widget.LinearLayout;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.ss.android.ugc.aweme.relation.ffp.vm.FindFriendsPageVM;
import kotlin.h.b.n;

@CZv
public final class ContactFriendsPage extends BaseFriendsPage {
    public EZL LJ;
    public final C0314Csc LJFF;
    public final int LJI = 2131559770;
    public SparseArray LJII;

    static {
        Covode.recordClassIndex(103137);
    }

    public final View LIZ(int i) {
        if (this.LJII == null) {
            this.LJII = new SparseArray();
        }
        View view = (View) this.LJII.get(i);
        if (view != null) {
            return view;
        }
        View view2 = getView();
        if (view2 == null) {
            return null;
        }
        View findViewById = view2.findViewById(i);
        this.LJII.put(i, findViewById);
        return findViewById;
    }

    public final FindFriendsPageVM LIZJ() {
        return (FindFriendsPageVM) this.LJFF.getValue();
    }

    public final void LJI() {
        SparseArray sparseArray = this.LJII;
        if (sparseArray != null) {
            sparseArray.clear();
        }
    }

    public final /* synthetic */ void onDestroyView() {
        ContactFriendsPage.super.onDestroyView();
        LJI();
    }

    public final int LIZ() {
        return this.LJI;
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [X.Cue] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZIZ() {
        /*
            r6 = this;
            com.ss.android.ugc.aweme.relation.ffp.vm.FindFriendsPageVM r1 = r6.LIZJ()
            X.PHD r2 = X.Akw.LIZ
            X.F2s r4 = new X.F2s
            r4.<init>(r6)
            r3 = 0
            r5 = 6
            r0 = r6
            X.C0382Cus.LIZ((X.C0368Cue) r0, (com.bytedance.assem.arch.viewModel.AssemViewModel) r1, (X.PHD) r2, (X.C0397Cvh) r3, (X.LsD) r4, (int) r5)
            com.ss.android.ugc.aweme.relation.ffp.vm.FindFriendsPageVM r1 = r6.LIZJ()
            X.F2r r0 = new X.F2r
            r0.<init>(r6)
            r6.LIZ(r1, r0)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.relation.fp.ContactFriendsPage.LIZIZ():void");
    }

    public ContactFriendsPage() {
        F3A f3a = F3A.LIZ;
        this.LJFF = new C0314Csc(KEM.LIZ.LIZ(FindFriendsPageVM.class), f3a, C0330Css.LIZ, AoK.LIZ(this, false), A7H.LIZ, F35.INSTANCE, AoK.LIZ(this, true), AoK.LIZIZ(this, true));
    }

    public final void LIZ(View view) {
        View view2 = view;
        MethodCollector.i(7319);
        M12.LIZ(view2);
        3c7 findViewById = view2.findViewById(2131367895);
        2uR r6 = new 2uR();
        3cA r3 = new 3cA();
        r3.LIZ(2131755170);
        r3.LIZIZ = true;
        r3.LIZ(new C5691F2x(this));
        r6.LIZ(new 3cI[]{r3});
        3cC r4 = new 3cC();
        CharSequence text = getText(2131827060);
        n.LIZIZ(text, "");
        r4.LIZ(text);
        r6.LIZ(r4);
        findViewById.setNavActions(r6);
        findViewById.LIZ(true);
        EZL LIZ = C4003EZz.LIZ.LIZ();
        this.LJ = LIZ;
        if (LIZ == null) {
            n.LIZ("");
        }
        1hK requireActivity = requireActivity();
        n.LIZIZ(requireActivity, "");
        LIZ.LIZ(new C3982EZe(requireActivity, C5566EzC.FIND_FRIENDS, new C3059Dzr("contact", (String) null, (String) null, (String) null, 14), false, false, false, false, false, false, false, (Integer) null, (Integer) null, false, (String) null, (String) null, 131000));
        EZL ezl = this.LJ;
        if (ezl == null) {
            n.LIZ("");
        }
        ezl.LIZ((Ls2<Boolean>) new C5689F2v(this));
        if (!(view2 instanceof LinearLayout)) {
            view2 = null;
        }
        LinearLayout linearLayout = (LinearLayout) view2;
        if (linearLayout != null) {
            EZL ezl2 = this.LJ;
            if (ezl2 == null) {
                n.LIZ("");
            }
            linearLayout.addView(ezl2.LIZIZ(), -1, -1);
            MethodCollector.o(7319);
            return;
        }
        MethodCollector.o(7319);
    }
}
