package com.ss.android.ugc.aweme.relation.ffp.ui;

import X.1hK;
import X.4pG;
import X.A7H;
import X.AkS;
import X.AmF;
import X.AoK;
import X.C0314Csc;
import X.C0330Css;
import X.C1445DZp;
import X.C3059Dzr;
import X.C3982EZe;
import X.C4003EZz;
import X.C5566EzC;
import X.C5676F2i;
import X.C5677F2j;
import X.C5680F2m;
import X.C5682F2o;
import X.D1G;
import X.EZL;
import X.J7F;
import X.KEM;
import X.LnI;
import X.Ls2;
import X.M12;
import X.OQh;
import X.Qen;
import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import androidx.fragment.app.Fragment;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.ss.android.ugc.aweme.relation.ffp.vm.FindFriendsPageVM;
import com.ss.android.ugc.aweme.relation.share.InviteFriendsPageSharePackage;
import kotlin.h.b.n;

public final class RecEmptyFragment extends FFPBaseFragment {
    public InviteFriendsPageSharePackage LJ;
    public EZL LJFF;
    public final C0314Csc LJI;
    public View LJII;
    public final int LJIIIIZZ = -1;
    public SparseArray LJIIIZ;

    static {
        Covode.recordClassIndex(102983);
    }

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

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

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

    public final int LIZJ() {
        return this.LJIIIIZZ;
    }

    /* 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 LJII() {
        /*
            r6 = this;
            com.ss.android.ugc.aweme.relation.ffp.ui.RecEmptyFragment.super.LJII()
            com.ss.android.ugc.aweme.relation.ffp.vm.FindFriendsPageVM r1 = r6.LIZ()
            X.PHD r2 = X.Akv.LIZ
            X.F2f r4 = new X.F2f
            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)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.relation.ffp.ui.RecEmptyFragment.LJII():void");
    }

    public final void onDestroyView() {
        RecEmptyFragment.super.onDestroyView();
        InviteFriendsPageSharePackage inviteFriendsPageSharePackage = this.LJ;
        if (inviteFriendsPageSharePackage == null) {
            n.LIZ("");
        }
        inviteFriendsPageSharePackage.LIZIZ.LIZ();
        LJI();
    }

    public RecEmptyFragment() {
        C5682F2o f2o = C5682F2o.LIZ;
        this.LJI = new C0314Csc(KEM.LIZ.LIZ(FindFriendsPageVM.class), f2o, C0330Css.LIZ, AoK.LIZ(this, false), A7H.LIZ, C5680F2m.INSTANCE, AoK.LIZ(this, true), AoK.LIZIZ(this, true));
    }

    public static final /* synthetic */ InviteFriendsPageSharePackage LIZ(RecEmptyFragment recEmptyFragment) {
        InviteFriendsPageSharePackage inviteFriendsPageSharePackage = recEmptyFragment.LJ;
        if (inviteFriendsPageSharePackage == null) {
            n.LIZ("");
        }
        return inviteFriendsPageSharePackage;
    }

    public final void LIZ(D1G<? extends Fragment> d1g) {
        RecEmptyFragment.super.LIZ(d1g);
        new AmF("invite").LIZJ();
    }

    public final void LIZ(View view) {
        M12.LIZ(view);
        View view2 = this.LJII;
        if (view2 == null) {
            n.LIZ("");
        }
        OQh oQh = new OQh();
        String string = getString(2131825112);
        n.LIZIZ(string, "");
        oQh.LIZ(string);
        String string2 = getString(2131825111);
        n.LIZIZ(string2, "");
        oQh.LIZ(string2);
        view2.findViewById(2131370625).setStatus(oQh);
        View view3 = this.LJII;
        if (view3 == null) {
            n.LIZ("");
        }
        view3.findViewById(2131366140).setText(2131825120);
        View view4 = this.LJII;
        if (view4 == null) {
            n.LIZ("");
        }
        View findViewById = view4.findViewById(2131366139);
        n.LIZIZ(findViewById, "");
        Resources system = Resources.getSystem();
        n.LIZIZ(system, "");
        Integer valueOf = Integer.valueOf(LnI.LIZ(TypedValue.applyDimension(1, 16.0f, system.getDisplayMetrics())));
        Resources system2 = Resources.getSystem();
        n.LIZIZ(system2, "");
        Qen.LIZIZ(findViewById, valueOf, (Integer) null, Integer.valueOf(LnI.LIZ(TypedValue.applyDimension(1, 16.0f, system2.getDisplayMetrics()))), (Integer) null, false, 26);
        View view5 = this.LJII;
        if (view5 == null) {
            n.LIZ("");
        }
        4pG findViewById2 = view5.findViewById(2131367356);
        n.LIZIZ(findViewById2, "");
        Context context = findViewById2.getContext();
        J7F j7f = new J7F();
        j7f.LIZ("text");
        InviteFriendsPageSharePackage inviteFriendsPageSharePackage = new InviteFriendsPageSharePackage("invitevia", "invite_friends", j7f);
        this.LJ = inviteFriendsPageSharePackage;
        inviteFriendsPageSharePackage.LIZ();
        InviteFriendsPageSharePackage inviteFriendsPageSharePackage2 = this.LJ;
        if (inviteFriendsPageSharePackage2 == null) {
            n.LIZ("");
        }
        1hK requireActivity = requireActivity();
        n.LIZIZ(requireActivity, "");
        findViewById2.LIZ(inviteFriendsPageSharePackage2.LIZ(requireActivity));
        findViewById2.LIZ(new C5676F2i(this, context));
        EZL ezl = this.LJFF;
        if (ezl == null) {
            n.LIZ("");
        }
        C1445DZp LIZJ = ezl.LIZJ();
        View view6 = this.LJII;
        if (view6 == null) {
            n.LIZ("");
        }
        LIZJ.LIZ(0, view6);
        new AmF("invite").LIZJ();
    }

    public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        MethodCollector.i(8073);
        M12.LIZ(layoutInflater);
        EZL LIZ = C4003EZz.LIZ.LIZ();
        AkS akS = LIZ().getState().LIZLLL;
        1hK requireActivity = requireActivity();
        n.LIZIZ(requireActivity, "");
        C3982EZe eZe = r4;
        C3982EZe eZe2 = new C3982EZe(requireActivity, C5566EzC.FIND_FRIENDS, new C3059Dzr(akS.LIZ, (String) null, (String) null, (String) null, 14), false, false, false, false, false, false, false, (Integer) null, 2131832443, false, (String) null, (String) null, 123496);
        LIZ.LIZ(eZe);
        LIZ.LIZ((Ls2<Boolean>) new C5677F2j(this));
        this.LJFF = LIZ;
        View inflate = View.inflate(getContext(), 2131559782, (ViewGroup) null);
        n.LIZIZ(inflate, "");
        this.LJII = inflate;
        EZL ezl = this.LJFF;
        if (ezl == null) {
            n.LIZ("");
        }
        FrameLayout LIZIZ = ezl.LIZIZ();
        MethodCollector.o(8073);
        return LIZIZ;
    }
}
