package com.bytedance.android.live.rank.impl.list.fragment.list;

import X.390;
import X.AnonymousClass0EC;
import X.AnonymousClass0HH;
import X.AnonymousClass13Z;
import X.C10000b0;
import X.C37491eF;
import X.C37741ee;
import X.FkL;
import X.GpC;
import X.M12;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.RecyclerView;
import com.bytedance.android.live.rank.impl.list.controller.child.list.WeeklyRisingRankController;
import com.bytedance.android.live.rank.impl.list.vm.list.WeeklyRisingRankViewModel;
import com.bytedance.covode.number.Covode;
import java.util.HashMap;

public final class WeeklyRisingFragment extends RankBaseFragment<WeeklyRisingRankViewModel, WeeklyRisingRankController> {
    public static final AnonymousClass13Z LIZ = new AnonymousClass13Z((byte) 0);
    public HashMap LJIIL;

    static {
        Covode.recordClassIndex(10346);
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [androidx.fragment.app.Fragment, com.bytedance.android.live.rank.impl.list.fragment.list.WeeklyRisingFragment] */
    public final View LIZIZ(int i) {
        if (this.LJIIL == null) {
            this.LJIIL = new HashMap();
        }
        View view = (View) this.LJIIL.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View view2 = getView();
        if (view2 == null) {
            return null;
        }
        View findViewById = view2.findViewById(i);
        this.LJIIL.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final void LIZJ() {
        HashMap hashMap = this.LJIIL;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

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

    public WeeklyRisingFragment() {
    }

    public final GpC LIZIZ() {
        return GpC.WEEKLY_RISING_RANK;
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [androidx.fragment.app.Fragment] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final /* synthetic */ com.bytedance.android.live.rank.impl.list.controller.child.list.BaseRankListController LIZ() {
        /*
            r3 = this;
            com.bytedance.android.live.rank.impl.list.controller.child.list.WeeklyRisingRankController r2 = new com.bytedance.android.live.rank.impl.list.controller.child.list.WeeklyRisingRankController
            r1 = r3
            com.bytedance.android.live.rank.impl.list.controller.child.RankRegionController r0 = r3.LIZLLL()
            r2.<init>(r1, r0)
            return r2
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.live.rank.impl.list.fragment.list.WeeklyRisingFragment.LIZ():com.bytedance.android.live.rank.impl.list.controller.child.list.BaseRankListController");
    }

    public /* synthetic */ WeeklyRisingFragment(byte b) {
        this();
    }

    public final void LIZ(FkL fkL) {
        M12.LIZ(fkL);
        fkL.LIZ(C37491eF.class, new C37741ee(this.LJIIJ));
    }

    public final void LIZ(RecyclerView recyclerView) {
        M12.LIZ(recyclerView);
        recyclerView.LIZ((AnonymousClass0EC) new 390(C10000b0.LIZ(4.0f)));
    }

    /* JADX WARNING: type inference failed for: r8v1, types: [X.1sP, android.widget.ImageView, java.lang.Object] */
    /* JADX WARNING: Removed duplicated region for block: B:28:0x00f9  */
    /* JADX WARNING: Removed duplicated region for block: B:41:0x0175  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZ(com.bytedance.android.livesdk.rank.list.model.RankListV2Response.RankInfo r24) {
        /*
            r23 = this;
            r12 = r23
            r10 = r24
            if (r10 != 0) goto L_0x0007
            return
        L_0x0007:
            android.view.View r2 = r23.LJI()
            r1 = 8
            if (r2 == 0) goto L_0x001d
            r0 = 2131370080(0x7f0a2060, float:1.8360156E38)
            android.view.View r0 = r2.findViewById(r0)
            android.widget.RelativeLayout r0 = (android.widget.RelativeLayout) r0
            if (r0 == 0) goto L_0x001d
            r0.setVisibility(r1)
        L_0x001d:
            android.view.View r1 = r23.LJI()
            if (r1 == 0) goto L_0x01e7
            r0 = 2131373112(0x7f0a2c38, float:1.8366306E38)
            android.view.View r1 = r1.findViewById(r0)
            if (r1 == 0) goto L_0x01e7
            r13 = 0
            r1.setVisibility(r13)
            r0 = 2131362309(0x7f0a0205, float:1.8344395E38)
            android.view.View r9 = r1.findViewById(r0)
            X.1jk r9 = (X.C40901jk) r9
            r0 = 2131362270(0x7f0a01de, float:1.8344316E38)
            android.view.View r8 = r1.findViewById(r0)
            X.1sP r8 = (X.C46271sP) r8
            r0 = 2131362307(0x7f0a0203, float:1.834439E38)
            android.view.View r7 = r1.findViewById(r0)
            X.1jk r7 = (X.C40901jk) r7
            r0 = 2131362295(0x7f0a01f7, float:1.8344367E38)
            android.view.View r6 = r1.findViewById(r0)
            X.1jk r6 = (X.C40901jk) r6
            r0 = 2131362312(0x7f0a0208, float:1.8344401E38)
            android.view.View r5 = r1.findViewById(r0)
            android.widget.LinearLayout r5 = (android.widget.LinearLayout) r5
            r0 = 2131362313(0x7f0a0209, float:1.8344403E38)
            android.view.View r4 = r1.findViewById(r0)
            X.1jk r4 = (X.C40901jk) r4
            r0 = 2131370095(0x7f0a206f, float:1.8360187E38)
            android.view.View r3 = r1.findViewById(r0)
            X.1sU r3 = (X.C46321sU) r3
            r0 = 2131364035(0x7f0a08c3, float:1.8347896E38)
            android.view.View r2 = r1.findViewById(r0)
            X.1jk r2 = (X.C40901jk) r2
            java.lang.String r0 = r10.LIZJ
            r9.setText(r0)
            long r0 = r10.LIZIZ
            r14 = 1
            int r11 = (r0 > r14 ? 1 : (r0 == r14 ? 0 : -1))
            if (r11 != 0) goto L_0x0147
            r0 = 2131100928(0x7f060500, float:1.7814251E38)
        L_0x0088:
            int r0 = X.C10000b0.LIZIZ((int) r0)
            r9.setTextColor(r0)
            com.bytedance.android.live.base.model.user.User r0 = r10.LIZ
            java.lang.String r11 = ""
            kotlin.h.b.n.LIZIZ(r0, r11)
            com.bytedance.android.live.base.model.ImageModel r15 = r0.getAvatarThumb()
            kotlin.h.b.n.LIZIZ(r8, r11)
            int r14 = r8.getWidth()
            int r1 = r8.getHeight()
            r0 = 2131234890(0x7f08104a, float:1.8085959E38)
            X.HI6.LIZ(r8, r15, r14, r1, r0)
            kotlin.h.b.n.LIZIZ(r7, r11)
            com.bytedance.android.live.base.model.user.User r0 = r10.LIZ
            java.lang.String r0 = X.C07930Ul.LIZ(r0)
            r7.setText(r0)
            com.bytedance.android.livesdk.rank.list.model.RankListV2Response$Gap r0 = r10.LJI
            com.bytedance.android.livesdk.model.message.common.Text r0 = r0.LIZ
            if (r0 == 0) goto L_0x00cc
            com.bytedance.android.livesdk.rank.list.model.RankListV2Response$Gap r0 = r10.LJI
            com.bytedance.android.livesdk.model.message.common.Text r0 = r0.LIZ
            kotlin.h.b.n.LIZIZ(r0, r11)
            java.lang.String r0 = r0.LIZ
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 == 0) goto L_0x0131
        L_0x00cc:
            kotlin.h.b.n.LIZIZ(r2, r11)
            r0 = 8
            r2.setVisibility(r0)
        L_0x00d4:
            long r0 = r10.LIZIZ
            r15 = 0
            r13 = 1
            int r14 = (r0 > r15 ? 1 : (r0 == r15 ? 0 : -1))
            if (r14 <= 0) goto L_0x0175
            java.lang.String r0 = r10.LIZJ
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 != 0) goto L_0x0175
            java.lang.String r1 = "-"
            java.lang.String r0 = r10.LIZJ
            boolean r0 = android.text.TextUtils.equals(r1, r0)
            if (r0 != 0) goto L_0x0175
            java.lang.String r1 = "0"
            java.lang.String r0 = r10.LIZJ
            boolean r0 = android.text.TextUtils.equals(r1, r0)
            if (r0 != 0) goto L_0x0175
            kotlin.h.b.n.LIZIZ(r3, r11)
            r0 = 8
            r3.setVisibility(r0)
            kotlin.h.b.n.LIZIZ(r6, r11)
            r3 = 2131828113(0x7f111d91, float:1.9289158E38)
            java.lang.Object[] r2 = new java.lang.Object[r13]
            com.bytedance.android.livesdk.rank.list.model.RankListV2Response$WeeklyRankExtra r0 = r10.LJII
            long r0 = r0.LIZIZ
            java.lang.Long r0 = java.lang.Long.valueOf(r0)
            r1 = 0
            r2[r1] = r0
            java.lang.String r0 = X.C10000b0.LIZ((int) r3, (java.lang.Object[]) r2)
            r6.setText(r0)
            r6.setVisibility(r1)
            kotlin.h.b.n.LIZIZ(r5, r11)
            r5.setVisibility(r1)
            kotlin.h.b.n.LIZIZ(r4, r11)
            long r0 = r10.LIZLLL
            java.lang.String r0 = java.lang.String.valueOf(r0)
            r4.setText(r0)
            return
        L_0x0131:
            kotlin.h.b.n.LIZIZ(r2, r11)
            r2.setVisibility(r13)
            com.bytedance.android.livesdk.rank.list.model.RankListV2Response$Gap r0 = r10.LJI
            com.bytedance.android.livesdk.model.message.common.Text r0 = r0.LIZ
            android.text.Spannable r0 = X.HL0.LIZ(r0, r11)
            java.lang.String r0 = r0.toString()
            r2.setText(r0)
            goto L_0x00d4
        L_0x0147:
            r14 = 2
            int r11 = (r0 > r14 ? 1 : (r0 == r14 ? 0 : -1))
            if (r11 != 0) goto L_0x0152
            r0 = 2131100929(0x7f060501, float:1.7814253E38)
            goto L_0x0088
        L_0x0152:
            r14 = 3
            int r11 = (r0 > r14 ? 1 : (r0 == r14 ? 0 : -1))
            if (r11 != 0) goto L_0x015d
            r0 = 2131100930(0x7f060502, float:1.7814255E38)
            goto L_0x0088
        L_0x015d:
            com.bytedance.android.live.rank.impl.list.controller.child.list.BaseRankListController r0 = r23.LJFF()
            PARENTC r0 = r0.LIZ
            com.bytedance.android.live.rank.impl.list.vm.RankRootViewModel r0 = r0.LIZIZ()
            boolean r0 = r0.LJ
            if (r0 == 0) goto L_0x0170
            r0 = 2131099758(0x7f06006e, float:1.7811878E38)
            goto L_0x0088
        L_0x0170:
            r0 = 2131100927(0x7f0604ff, float:1.781425E38)
            goto L_0x0088
        L_0x0175:
            kotlin.h.b.n.LIZIZ(r6, r11)
            r0 = 8
            r6.setVisibility(r0)
            int r0 = r3.getVisibility()
            if (r0 == 0) goto L_0x01a2
            boolean r0 = r23.getUserVisibleHint()
            if (r0 == 0) goto L_0x01a2
            X.GpA r15 = X.GpA.LIZ
            X.GpC r14 = X.GpC.WEEKLY_RISING_RANK
            boolean r13 = r3.isEnabled()
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r12.LJIIIIZZ
            com.bytedance.android.live.rank.impl.list.controller.child.list.BaseRankListController r0 = r23.LJFF()
            PARENTC r0 = r0.LIZ
            com.bytedance.android.live.rank.impl.list.vm.RankRootViewModel r0 = r0.LIZIZ()
            boolean r0 = r0.LJFF
            r15.LIZ(r14, r13, r1, r0)
        L_0x01a2:
            r0 = 0
            r3.setVisibility(r0)
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r12.LJIIIIZZ
            if (r1 == 0) goto L_0x01e8
            java.lang.Class<X.Fv7> r0 = X.Fv7.class
            java.lang.Object r0 = r1.LIZIZ(r0)
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = (com.bytedance.android.livesdkapi.depend.model.live.Room) r0
            if (r0 == 0) goto L_0x01e8
            com.bytedance.android.livesdk.model.RoomAuthStatus r0 = r0.getRoomAuthStatus()
            if (r0 == 0) goto L_0x01e8
            boolean r1 = r0.isEnableGift()
            r0 = 1
            if (r1 != r0) goto L_0x01e8
            r0 = 1
        L_0x01c2:
            r3.setEnabled(r0)
            X.13a r12 = new X.13a
            r14 = r23
            r21 = r5
            r22 = r4
            r19 = r3
            r20 = r6
            r17 = r7
            r18 = r2
            r15 = r9
            r16 = r8
            r13 = r10
            r12.<init>(r13, r14, r15, r16, r17, r18, r19, r20, r21, r22)
            r3.setOnClickListener(r12)
            kotlin.h.b.n.LIZIZ(r5, r11)
            r0 = 8
            r5.setVisibility(r0)
        L_0x01e7:
            return
        L_0x01e8:
            r0 = 0
            goto L_0x01c2
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.live.rank.impl.list.fragment.list.WeeklyRisingFragment.LIZ(com.bytedance.android.livesdk.rank.list.model.RankListV2Response$RankInfo):void");
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [X.0CH] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void onViewCreated(android.view.View r4, android.os.Bundle r5) {
        /*
            r3 = this;
            X.M12.LIZ(r4)
            super.onViewCreated(r4, r5)
            com.bytedance.android.live.rank.impl.list.controller.child.list.BaseRankListController r0 = r3.LJFF()
            com.bytedance.android.live.rank.impl.list.vm.list.BaseRankListViewModel r0 = r0.LJ()
            com.bytedance.android.live.rank.impl.list.vm.list.WeeklyRisingRankViewModel r0 = (com.bytedance.android.live.rank.impl.list.vm.list.WeeklyRisingRankViewModel) r0
            X.1Bn<com.bytedance.android.livesdk.rank.list.model.WeeklyRankRegionInfo> r2 = r0.LJII
            r1 = r3
            X.1en r0 = new X.1en
            r0.<init>(r3)
            r2.observe(r1, r0)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.live.rank.impl.list.fragment.list.WeeklyRisingFragment.onViewCreated(android.view.View, android.os.Bundle):void");
    }

    public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        M12.LIZ(layoutInflater);
        if (this.LJ != null) {
            return this.LJ;
        }
        View LIZ2 = AnonymousClass0HH.LIZ(layoutInflater, 2131561904, viewGroup, false);
        this.LJ = LIZ2;
        return LIZ2;
    }
}
