package com.bytedance.android.livesdk.live.data;

import X.0yx;
import X.1Bn;
import X.5Fn;
import X.C1275FyW;
import X.C1277FyY;
import X.Mk2;
import X.Mk3;
import X.PhE;
import X.PlI;
import android.text.TextUtils;
import com.bytedance.android.livesdk.live.api.RoomStatApi;
import com.bytedance.android.livesdk.live.model.RoomStatsModel;
import com.bytedance.android.livesdk.util.rxutils.RxViewModel;
import com.bytedance.android.livesdkapi.depend.model.live.Room;
import com.bytedance.covode.number.Covode;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class RoomStatsViewModel extends RxViewModel {
    public final 1Bn<Map<String, RoomStatsModel>> LIZ = new 1Bn<>();

    static {
        Covode.recordClassIndex(17562);
    }

    public final void LIZ(List<Room> list) {
        if (5Fn.LIZ(list)) {
            this.LIZ.setValue(new HashMap());
            return;
        }
        LinkedList linkedList = new LinkedList();
        for (Room next : list) {
            if (next != null) {
                linkedList.add(Long.valueOf(next.getId()));
            }
        }
        ((RoomStatApi) 0yx.LIZ().LIZ(RoomStatApi.class)).checkRoom(TextUtils.join(",", linkedList)).LIZIZ(PhE.LIZIZ(PlI.LIZJ)).LIZ(Mk2.LIZ(Mk3.LIZ)).LIZ(new C1275FyW(this), new C1277FyY(this));
    }
}
