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

import X.0C0;
import X.0CH;
import X.0HH;
import X.2Pr;
import X.7he;
import X.C2188AoK;
import X.C2246ApG;
import X.C2267Apb;
import X.C2269Apd;
import X.C2270Ape;
import X.C2271Apf;
import X.C2272Apg;
import X.C2273Aph;
import X.C3251BDb;
import X.Crj;
import X.Csa;
import X.Css;
import X.Csw;
import X.Csy;
import X.D1G;
import X.KEM;
import X.LsC;
import X.M12;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import com.bytedance.assem.arch.core.Assembler;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.relation.viewmodel.RecFriendsListViewModel;
import java.io.Serializable;
import kotlin.h.b.n;

public final class NewVersionRecFriendsFragment extends Hilt_NewVersionRecFriendsFragment {
    public static final C2269Apd LIZLLL = new C2269Apd((byte) 0);
    public C2246ApG LIZ;
    public String LIZIZ;
    public String LIZJ;
    public final Csa LJ;
    public final Crj LJIIIZ;
    public SparseArray LJIIJ;

    static {
        Covode.recordClassIndex(103257);
    }

    private final RecFriendsListViewModel LIZ() {
        return (RecFriendsListViewModel) this.LJ.getValue();
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.base.fragment.AmeBaseFragment, com.ss.android.ugc.aweme.relation.recommend.NewVersionRecFriendsFragment] */
    public final /* synthetic */ void onDestroyView() {
        NewVersionRecFriendsFragment.super.onDestroyView();
        SparseArray sparseArray = this.LJIIJ;
        if (sparseArray != null) {
            sparseArray.clear();
        }
    }

    public NewVersionRecFriendsFragment() {
        Csa csa;
        Csy csy = Csy.LIZ;
        C2270Ape ape = new C2270Ape(this);
        D1G LIZ2 = KEM.LIZ.LIZ(RecFriendsListViewModel.class);
        C2271Apf apf = new C2271Apf(LIZ2);
        C2273Aph aph = C2273Aph.INSTANCE;
        if (n.LIZ(csy, Csw.LIZ)) {
            csa = new Csa(LIZ2, apf, Css.LIZ, C2188AoK.LIZ((0CH) this, true), C2188AoK.LIZ((0C0) this, true), ape, aph, C2188AoK.LIZ((Fragment) this, true), C2188AoK.LIZIZ((Fragment) this, true));
        } else if (csy != null && !n.LIZ(csy, Csy.LIZ)) {
            throw new IllegalArgumentException("Do not support this scope here.");
        } else {
            csa = new Csa(LIZ2, apf, Css.LIZ, C2188AoK.LIZ((0CH) this, false), C2188AoK.LIZ((0C0) this, false), ape, aph, C2188AoK.LIZ((Fragment) this, false), C2188AoK.LIZIZ((Fragment) this, false));
        }
        this.LJ = csa;
        this.LJIIIZ = 7he.LIZ(C2272Apg.LIZ);
        this.LIZIZ = "";
        this.LIZJ = "";
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [com.ss.android.ugc.aweme.base.fragment.AmeBaseFragment, androidx.fragment.app.Fragment, com.ss.android.ugc.aweme.relation.recommend.NewVersionRecFriendsFragment] */
    public final void onViewCreated(View view, Bundle bundle) {
        M12.LIZ(view);
        NewVersionRecFriendsFragment.super.onViewCreated(view, bundle);
        String str = (String) this.LJIIIZ.getValue();
        if (str == null || str.length() == 0) {
            LIZ().LIZ(getActivity());
            return;
        }
        Bundle arguments = getArguments();
        if (arguments != null) {
            Serializable serializable = arguments.getSerializable("recommendFriendsConfig");
            if (!(serializable instanceof C2246ApG)) {
                serializable = null;
            }
            C2246ApG apG = (C2246ApG) serializable;
            if (apG == null) {
                LIZ().LIZ(getActivity());
                return;
            }
            this.LIZ = apG;
            String string = arguments.getString("platforms");
            String str2 = "";
            if (string == null) {
                string = str2;
            }
            this.LIZIZ = string;
            String string2 = arguments.getString("skip_platforms");
            if (string2 != null) {
                str2 = string2;
            }
            this.LIZJ = str2;
        }
        C3251BDb.LIZ((Fragment) this, (LsC<? super Assembler, 2Pr>) new C2267Apb(this));
    }

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