package com.ss.android.ugc.aweme.qna;

import X.0HH;
import X.0Q2;
import X.0Q5;
import X.0Q6;
import X.1hK;
import X.2Pr;
import X.2UX;
import X.2Ws;
import X.2nK;
import X.BWM;
import X.BWP;
import X.BWQ;
import X.BWT;
import X.BWU;
import X.BWV;
import X.BWW;
import X.BWX;
import X.C2993B3d;
import X.C3251BDb;
import X.C3753BWj;
import X.C6391CZv;
import X.Crj;
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.bytedance.ies.foundation.fragment.BaseFragment;
import com.bytedance.router.arg.RouteArgExtension;
import java.util.Map;
import kotlin.h.b.n;

@C6391CZv
public final class QnaProfile extends BaseFragment implements 0Q6 {
    public static final C3753BWj LJFF = new C3753BWj((byte) 0);
    public final Crj LJ = RouteArgExtension.INSTANCE.optionalArgNotNull(this, BWU.LIZ, "question_ids", long[].class);
    public final Crj LJI = RouteArgExtension.INSTANCE.optionalArgNotNull(this, BWW.LIZ, "enter_from", String.class);
    public final Crj LJII = RouteArgExtension.INSTANCE.optionalArgNotNull(this, BWX.LIZ, "enter_method", String.class);
    public final Crj LJIIIIZZ = RouteArgExtension.INSTANCE.optionalArgNotNull(this, BWV.LIZ, "to_user_id", String.class);
    public final Crj LJIIIZ = RouteArgExtension.INSTANCE.optionalArg(this, BWT.LIZ, "qa_profile_mode", C2993B3d.class);
    public SparseArray LJIIJ;

    static {
        Covode.recordClassIndex(101514);
    }

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

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

    public final String LIZLLL() {
        return (String) this.LJII.getValue();
    }

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

    public final String LJII() {
        return (String) this.LJIIIIZZ.getValue();
    }

    public final C2993B3d LJIIIIZZ() {
        return (C2993B3d) this.LJIIIZ.getValue();
    }

    public final String getBtmPageCode() {
        return "b3772";
    }

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

    public final String aB_() {
        return 0Q5.LIZ(this);
    }

    public final Map<String, String> aE_() {
        M12.LIZ(this);
        return null;
    }

    public final void onResume() {
        QnaProfile.super.onResume();
        0Q2.LIZ(this);
    }

    public final void onActivityCreated(Bundle bundle) {
        QnaProfile.super.onActivityCreated(bundle);
        LIZIZ(BWP.LIZ);
    }

    public final void onCreate(Bundle bundle) {
        QnaProfile.super.onCreate(bundle);
        LIZ(BWQ.LIZ);
    }

    public final void onViewCreated(View view, Bundle bundle) {
        M12.LIZ(view);
        QnaProfile.super.onViewCreated(view, bundle);
        C3251BDb.LIZ((Fragment) this, (LsC<? super Assembler, 2Pr>) new BWM(this, view));
        if (LJIIIIZZ() == C2993B3d.FYP_BANNER) {
            2UX r1 = new 2UX();
            r1.LIZ("enter_from", "homepage_hot");
            r1.LIZ("enter_method", "click_banner");
            2nK.LIZ("enter_qa_trending_page", r1.LIZ);
        } else if (2Ws.LIZ(LJII())) {
            String LIZLLL = LIZLLL();
            String LIZ = LIZ();
            2UX r0 = new 2UX();
            r0.LIZ("enter_from", LIZ);
            r0.LIZ("enter_method", LIZLLL);
            2nK.LIZ("enter_qa_personal_profile", r0.LIZ);
        } else {
            String LJII2 = LJII();
            String LIZ2 = LIZ();
            2UX r12 = new 2UX();
            r12.LIZ("enter_method", "click_qa_entrance");
            r12.LIZ("enter_from", LIZ2);
            r12.LIZ("to_user_id", LJII2);
            2nK.LIZ("enter_qa_others_profile", r12.LIZ);
        }
        1hK requireActivity = requireActivity();
        n.LIZIZ(requireActivity, "");
        requireActivity.getWindow().setSoftInputMode(48);
    }

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