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

import X.0CH;
import X.0HH;
import X.2Pr;
import X.4HR;
import X.4hP;
import X.ARD;
import X.ARE;
import X.ARF;
import X.ARG;
import X.Cuh;
import X.Cv8;
import X.Cvh;
import X.CwK;
import X.CwU;
import X.Cwc;
import X.Cwf;
import X.LsC;
import X.LsD;
import X.LsE;
import X.LsF;
import X.Lsh;
import X.M12;
import X.PHD;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.bytedance.assem.arch.viewModel.AssemViewModel;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.foundation.fragment.BaseFragment;

public abstract class BaseFriendsPage extends BaseFragment implements ARE {
    public SparseArray LJ;

    static {
        Covode.recordClassIndex(103132);
    }

    public abstract int LIZ();

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

    public abstract void LIZ(View view);

    public abstract void LIZIZ();

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

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

    public 0CH getActualLifecycleOwner() {
        ARD.LIZIZ(this);
        return this;
    }

    public Cv8 getActualLifecycleOwnerHolder() {
        ARD.LIZ(this);
        return this;
    }

    public 4hP getActualReceiver() {
        ARD.LIZLLL(this);
        return this;
    }

    public Cuh<4hP> getActualReceiverHolder() {
        ARD.LIZJ(this);
        return this;
    }

    public 0CH getHostLifecycleOwner() {
        M12.LIZ(this);
        return null;
    }

    public 0CH getOwnLifecycleOwner() {
        ARD.LJ(this);
        return this;
    }

    public 4hP getReceiverForHostVM() {
        M12.LIZ(this);
        return null;
    }

    public boolean getUniqueOnlyDefault() {
        return ARD.LJFF(this);
    }

    public void onActivityCreated(Bundle bundle) {
        BaseFriendsPage.super.onActivityCreated(bundle);
        LIZIZ(ARF.LIZ);
    }

    public void onCreate(Bundle bundle) {
        LIZ(ARG.LIZ);
        BaseFriendsPage.super.onCreate(bundle);
    }

    public final <VM1 extends AssemViewModel<S1>, S1 extends 4HR, R> R LIZ(VM1 vm1, LsC<? super S1, ? extends R> lsC) {
        M12.LIZ(vm1, lsC);
        return ARD.LIZ(this, vm1, lsC);
    }

    public void onViewCreated(View view, Bundle bundle) {
        M12.LIZ(view);
        BaseFriendsPage.super.onViewCreated(view, bundle);
        LIZ(view);
        LIZIZ();
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        M12.LIZ(layoutInflater);
        return 0HH.LIZ(layoutInflater, LIZ(), viewGroup, false);
    }

    public <S extends 4HR> void subscribe(AssemViewModel<S> assemViewModel, Cvh<S> cvh, LsC<? super Throwable, 2Pr> lsC, LsD<? super 4hP, ? super S, 2Pr> lsD) {
        M12.LIZ(assemViewModel, cvh, lsD);
        ARD.LIZ(this, assemViewModel, cvh, lsC, lsD);
    }

    public <S extends 4HR, A> void selectSubscribe(AssemViewModel<S> assemViewModel, PHD<S, ? extends A> phd, Cvh<CwK<A>> cvh, LsC<? super Throwable, 2Pr> lsC, LsD<? super 4hP, ? super A, 2Pr> lsD) {
        M12.LIZ(assemViewModel, phd, cvh, lsD);
        ARD.LIZ(this, assemViewModel, phd, cvh, lsC, lsD);
    }

    public <S extends 4HR, A> void selectSubscribeOnAsync(AssemViewModel<S> assemViewModel, PHD<S, ? extends A> phd, Cvh<CwK<A>> cvh, LsC<? super Throwable, 2Pr> lsC, LsD<? super 4hP, ? super A, 2Pr> lsD) {
        M12.LIZ(assemViewModel, phd, cvh, lsD);
        ARD.LIZIZ(this, assemViewModel, phd, cvh, lsC, lsD);
    }

    public <S extends 4HR, A, B> void selectSubscribe(AssemViewModel<S> assemViewModel, PHD<S, ? extends A> phd, PHD<S, ? extends B> phd2, Cvh<CwU<A, B>> cvh, LsC<? super Throwable, 2Pr> lsC, LsE<? super 4hP, ? super A, ? super B, 2Pr> lsE) {
        M12.LIZ(assemViewModel, phd, phd2, cvh, lsE);
        ARD.LIZ(this, assemViewModel, phd, phd2, cvh, lsC, lsE);
    }

    public <S extends 4HR, A, B, C> void selectSubscribe(AssemViewModel<S> assemViewModel, PHD<S, ? extends A> phd, PHD<S, ? extends B> phd2, PHD<S, ? extends C> phd3, Cvh<Cwc<A, B, C>> cvh, LsC<? super Throwable, 2Pr> lsC, LsF<? super 4hP, ? super A, ? super B, ? super C, 2Pr> lsF) {
        LsF<? super 4hP, ? super A, ? super B, ? super C, 2Pr> lsF2 = lsF;
        AssemViewModel<S> assemViewModel2 = assemViewModel;
        PHD<S, ? extends A> phd4 = phd;
        PHD<S, ? extends B> phd5 = phd2;
        PHD<S, ? extends C> phd6 = phd3;
        Cvh<Cwc<A, B, C>> cvh2 = cvh;
        M12.LIZ(assemViewModel2, phd4, phd5, phd6, cvh2, lsF2);
        ARD.LIZ(this, assemViewModel2, phd4, phd5, phd6, cvh2, lsC, lsF2);
    }

    public <S extends 4HR, A, B, C, D> void selectSubscribe(AssemViewModel<S> assemViewModel, PHD<S, ? extends A> phd, PHD<S, ? extends B> phd2, PHD<S, ? extends C> phd3, PHD<S, ? extends D> phd4, Cvh<Cwf<A, B, C, D>> cvh, LsC<? super Throwable, 2Pr> lsC, Lsh<? super 4hP, ? super A, ? super B, ? super C, ? super D, 2Pr> lsh) {
        Lsh<? super 4hP, ? super A, ? super B, ? super C, ? super D, 2Pr> lsh2 = lsh;
        AssemViewModel<S> assemViewModel2 = assemViewModel;
        PHD<S, ? extends A> phd5 = phd;
        PHD<S, ? extends B> phd6 = phd2;
        PHD<S, ? extends C> phd7 = phd3;
        PHD<S, ? extends D> phd8 = phd4;
        Cvh<Cwf<A, B, C, D>> cvh2 = cvh;
        M12.LIZ(assemViewModel2, phd5, phd6, phd7, phd8, cvh2, lsh2);
        ARD.LIZ(this, assemViewModel2, phd5, phd6, phd7, phd8, cvh2, lsC, lsh2);
    }
}
