package xyz.stream.api.database;

import androidx.room.RoomDatabase;
import java.util.HashMap;
import xyz.stream.api.database.entity.LiveFavorite;
import xyz.stream.api.database.entity.LiveHistory;
import xyz.stream.utils.f0;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class j implements Runnable {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f35821a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ l f35822b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ Integer f35823c;

    public /* synthetic */ j(l lVar, Integer num, int i10) {
        this.f35821a = i10;
        this.f35822b = lVar;
        this.f35823c = num;
    }

    @Override // java.lang.Runnable
    public final void run() {
        int i10 = this.f35821a;
        Integer num = this.f35823c;
        l lVar = this.f35822b;
        switch (i10) {
            case 0:
                lVar.getClass();
                String strQ = f0.o().q("flutter.selectRoles", "");
                LiveFavorite liveFavoriteG = ((com.bumptech.glide.load.engine.p) lVar.f35829b).g(num.intValue(), strQ);
                xyz.stream.api.o oVarF = xyz.stream.api.o.f();
                int iIntValue = num.intValue();
                oVarF.getClass();
                if (!xyz.stream.api.o.D()) {
                    HashMap map = new HashMap();
                    map.put("channel_id", Integer.valueOf(iIntValue));
                    map.put("role_id", f0.o().q("flutter.selectRoles", ""));
                    xyz.stream.api.o.v("user/live_channel/favorite/del", oVarF.n(), xyz.stream.utils.m.a(map), new xyz.stream.api.n(oVarF, "user/live_channel/favorite/del", map, 8));
                }
                if (liveFavoriteG != null) {
                    lVar.f35830c.runInTransaction(new ve.b(lVar, liveFavoriteG, 19));
                    break;
                }
                break;
            default:
                LiveHistory liveHistory = (LiveHistory) androidx.room.util.b.b((RoomDatabase) ((com.bumptech.glide.load.engine.p) lVar.f35829b).f5756a, true, false, new h3.d(num.intValue(), 2));
                if (liveHistory != null) {
                    xyz.stream.api.o.f().d(false, liveHistory.getChannelId());
                    lVar.f35830c.runInTransaction(new i(lVar, liveHistory, 1));
                    break;
                }
                break;
        }
    }
}
