package com.bytedance.android.live.rank.impl.list.controller.child.list;

import X.2GD;
import X.6Is;
import X.9HM;
import X.AnonymousClass0CB;
import X.AnonymousClass0CH;
import X.C03060Bs;
import X.C03070Bt;
import X.C03090Bv;
import X.C03110Bx;
import X.C03120By;
import X.GAX;
import X.Gg0;
import X.Glf;
import X.Gok;
import X.GpC;
import X.Gpc;
import X.Gqb;
import X.Grf;
import X.Lea;
import X.M12;
import androidx.fragment.app.Fragment;
import com.bytedance.android.live.base.model.user.User;
import com.bytedance.android.live.rank.impl.list.controller.child.RankRegionController;
import com.bytedance.android.live.rank.impl.list.vm.list.BaseRankListViewModel;
import com.bytedance.android.live.rank.impl.list.vm.list.WeeklyHistoryViewModel;
import com.bytedance.android.livesdk.rank.list.model.RankListV2Response;
import com.bytedance.android.livesdk.rank.list.model.WeeklyRankRegionInfo;
import com.bytedance.android.livesdkapi.session.EnterRoomConfig;
import com.bytedance.android.livesdkapi.session.EnterRoomLinkSession;
import com.bytedance.android.livesdkapi.session.Event;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;
import java.util.List;
import kotlin.h.b.n;

public final class WeeklyHistoryController extends BaseRankListController<WeeklyHistoryViewModel> implements 6Is {
    static {
        Covode.recordClassIndex(10279);
    }

    public final void LIZ(long j) {
    }

    public final void LIZJ() {
    }

    public final void onStateChanged(AnonymousClass0CH r1, AnonymousClass0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public final GpC LJI() {
        return GpC.WEEKLY_RANK;
    }

    public final /* synthetic */ BaseRankListViewModel LIZ(Fragment fragment) {
        M12.LIZ(fragment);
        C03110Bx LIZ = C03120By.LIZ(fragment, (C03090Bv) null);
        if (2GD.LIZ) {
            C03060Bs.LIZ(LIZ, fragment);
        }
        C03070Bt LIZ2 = LIZ.LIZ(WeeklyHistoryViewModel.class);
        n.LIZIZ(LIZ2, "");
        return (WeeklyHistoryViewModel) LIZ2;
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public WeeklyHistoryController(Fragment fragment, RankRegionController rankRegionController) {
        super(fragment, rankRegionController);
        M12.LIZ(fragment, rankRegionController);
    }

    public final void LIZ(int i, RankListV2Response.RankInfo rankInfo, RankListV2Response.RankView rankView) {
        String str;
        M12.LIZ(rankInfo, rankView);
        Glf glf = GAX.LIZ;
        n.LIZIZ(glf, "");
        glf.LIZ().LIZ(new Event("weekly_rank_jump_other_room", 37888, Gqb.BussinessApiCall));
        List list = rankView.LIZJ;
        EnterRoomConfig enterRoomConfig = new EnterRoomConfig();
        enterRoomConfig.LIZLLL.LJJJJJ = GpC.WEEKLY_RANK.getRankName();
        enterRoomConfig.LIZLLL.LJJJJI = "live_detail";
        enterRoomConfig.LIZLLL.LJJLIIIJJI = "click";
        WeeklyRankRegionInfo weeklyRankRegionInfo = rankView.LJI;
        if (weeklyRankRegionInfo != null) {
            EnterRoomConfig.RoomsData roomsData = enterRoomConfig.LIZLLL;
            if (weeklyRankRegionInfo.LIZIZ == Gok.VIEWER.getValue()) {
                str = "user_live_area";
            } else {
                str = "anchor_live_area";
            }
            roomsData.LJLLL = str;
        }
        EnterRoomConfig.LogData logData = enterRoomConfig.LIZJ;
        User user = rankInfo.LIZ;
        n.LIZIZ(user, "");
        logData.LIZIZ = String.valueOf(user.getId());
        n.LIZIZ(list, "");
        if (!list.isEmpty()) {
            EnterRoomConfig.RoomsData roomsData2 = enterRoomConfig.LIZLLL;
            ArrayList arrayList = new ArrayList();
            for (Object next : list) {
                if (((RankListV2Response.RankInfo) next).LJFF > 0) {
                    arrayList.add(next);
                }
            }
            List<RankListV2Response.RankInfo> list2 = arrayList;
            ArrayList arrayList2 = new ArrayList(9HM.LIZ(list2, 10));
            for (RankListV2Response.RankInfo rankInfo2 : list2) {
                arrayList2.add(Long.valueOf(rankInfo2.LJFF));
            }
            roomsData2.LJJJI = Lea.LJI(arrayList2);
            EnterRoomConfig.RoomsData roomsData3 = enterRoomConfig.LIZLLL;
            Glf glf2 = GAX.LIZ;
            n.LIZIZ(glf2, "");
            EnterRoomLinkSession LIZ = glf2.LIZ();
            n.LIZIZ(LIZ, "");
            roomsData3.LJJIIJ = Gpc.LIZIZ(LIZ.LIZIZ);
        }
        EnterRoomLinkSession.LIZ(enterRoomConfig).LIZ(new Event("weekly_rank_jump_to_live", 5120, Gqb.BussinessApiCall));
        Gg0.LIZ().LIZ(new Grf(rankInfo.LJFF, enterRoomConfig));
    }
}
