package xyz.netfly.viewmodel;

import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import androidx.core.view.f3;
import androidx.core.view.l0;
import ie.r3;
import ie.x3;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import t4.f;
import xyz.stream.api.database.entity.MyListEntity;
import xyz.stream.api.database.n;
import xyz.stream.api.entity.LiveChannelEntity;
import xyz.stream.api.entity.VideoCollectionEntity;
import xyz.stream.api.entity.VideoEntity;
import xyz.stream.api.entity.VideoInfoEntity;
import xyz.stream.utils.f0;
import xyz.stream.view.BindingDialogBuilder;
import xyz.stream.view.CustomLoading;
import xyz.stream.view.databinding.LayoutCustomUpdateDialogBinding;
import xyz.stream.view.databinding.LayoutDialogErrorTipBinding;
import xyz.stream.view.databinding.LayoutDialogNoSpaceBinding;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class a implements ag.b, BindingDialogBuilder.BindingInflater, u4.c, u4.a, l0, BindingDialogBuilder.ViewProvider {

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

    public /* synthetic */ a(int i10) {
        this.f35737a = i10;
    }

    @Override // ag.b
    public final void a() {
        System.exit(0);
    }

    @Override // u4.a
    public final Object apply(Object obj) {
        MyListEntity myListEntity = (MyListEntity) obj;
        ExecutorService executorService = n.f35835a;
        Integer num = myListEntity.videoId;
        String str = myListEntity.videoPic;
        String str2 = myListEntity.backdropPath;
        String str3 = myListEntity.wideBackdropPath;
        String str4 = myListEntity.voteAverage;
        Integer num2 = myListEntity.sourceType;
        Integer numValueOf = Integer.valueOf(num2 == null ? 0 : num2.intValue());
        String str5 = myListEntity.title;
        Long l10 = myListEntity.updateTime;
        return new MyListEntity(num, str, str2, str3, str4, numValueOf, str5, Long.valueOf(l10 == null ? 0L : l10.longValue()), myListEntity.roleId);
    }

    @Override // xyz.stream.view.BindingDialogBuilder.ViewProvider
    public final View get(v3.a aVar) {
        return ((LayoutDialogErrorTipBinding) aVar).tvErrorTip;
    }

    @Override // androidx.core.view.l0
    public final f3 i(View view, f3 f3Var) {
        Handler handler = CustomLoading.f36250b;
        return f3.f1746b;
    }

    @Override // xyz.stream.view.BindingDialogBuilder.BindingInflater
    public final v3.a inflate(LayoutInflater layoutInflater) {
        switch (this.f35737a) {
            case 1:
                return x3.inflate(layoutInflater, null, false);
            case 2:
                return r3.inflate(layoutInflater, null, false);
            case 19:
                return LayoutDialogNoSpaceBinding.inflate(layoutInflater);
            case 20:
                return LayoutDialogErrorTipBinding.inflate(layoutInflater);
            default:
                return LayoutCustomUpdateDialogBinding.inflate(layoutInflater);
        }
    }

    @Override // u4.c
    public final boolean test(Object obj) {
        switch (this.f35737a) {
            case 3:
                VideoCollectionEntity videoCollectionEntity = (VideoCollectionEntity) obj;
                List<VideoEntity> videoList = videoCollectionEntity.getVideoList();
                if (videoList == null || videoList.isEmpty()) {
                    return true;
                }
                ArrayList arrayListE = f.x(videoList).e(new a(7)).E();
                videoCollectionEntity.setVideoList(arrayListE);
                return true ^ arrayListE.isEmpty();
            case 4:
                VideoCollectionEntity videoCollectionEntity2 = (VideoCollectionEntity) obj;
                List<VideoEntity> videoList2 = videoCollectionEntity2.getVideoList();
                if (videoList2 == null || videoList2.isEmpty()) {
                    return true;
                }
                ArrayList arrayListE2 = f.x(videoList2).e(new a(6)).E();
                videoCollectionEntity2.setVideoList(arrayListE2);
                return true ^ arrayListE2.isEmpty();
            case 5:
                f0 f0VarO = f0.o();
                Integer id2 = ((VideoInfoEntity) obj).getId();
                f0VarO.getClass();
                return !f0.r(id2);
            case 6:
                f0 f0VarO2 = f0.o();
                Integer numValueOf = Integer.valueOf(((VideoEntity) obj).getVideoId());
                f0VarO2.getClass();
                return !f0.r(numValueOf);
            case 7:
                f0 f0VarO3 = f0.o();
                Integer numValueOf2 = Integer.valueOf(((VideoEntity) obj).getVideoId());
                f0VarO3.getClass();
                return !f0.r(numValueOf2);
            case 8:
            default:
                f0 f0VarO4 = f0.o();
                Integer numValueOf3 = Integer.valueOf(((VideoEntity) obj).getVideoId());
                f0VarO4.getClass();
                return !f0.r(numValueOf3);
            case 9:
                ExecutorService executorService = n.f35835a;
                f0 f0VarO5 = f0.o();
                Integer videoId = ((MyListEntity) obj).getVideoId();
                f0VarO5.getClass();
                return !f0.r(videoId);
            case 10:
                LiveChannelEntity liveChannelEntity = (LiveChannelEntity) obj;
                return (liveChannelEntity == null || liveChannelEntity.getId() == null || liveChannelEntity.getIsPremium() == 2) ? false : true;
            case 11:
                f0 f0VarO6 = f0.o();
                Integer numValueOf4 = Integer.valueOf(((VideoEntity) obj).getVideoId());
                f0VarO6.getClass();
                return !f0.r(numValueOf4);
            case 12:
                f0 f0VarO7 = f0.o();
                Integer numValueOf5 = Integer.valueOf(((VideoEntity) obj).getVideoId());
                f0VarO7.getClass();
                return !f0.r(numValueOf5);
            case 13:
                VideoEntity videoEntity = (VideoEntity) obj;
                if (videoEntity.getSourceType() != 2) {
                    return false;
                }
                f0 f0VarO8 = f0.o();
                Integer numValueOf6 = Integer.valueOf(videoEntity.getVideoId());
                f0VarO8.getClass();
                return !f0.r(numValueOf6);
            case 14:
                VideoEntity videoEntity2 = (VideoEntity) obj;
                if (videoEntity2.getSourceType() != 3) {
                    return false;
                }
                f0 f0VarO9 = f0.o();
                Integer numValueOf7 = Integer.valueOf(videoEntity2.getVideoId());
                f0VarO9.getClass();
                return !f0.r(numValueOf7);
            case 15:
                f0 f0VarO10 = f0.o();
                Integer numValueOf8 = Integer.valueOf(((VideoEntity) obj).getVideoId());
                f0VarO10.getClass();
                return !f0.r(numValueOf8);
            case 16:
                f0 f0VarO11 = f0.o();
                Integer numValueOf9 = Integer.valueOf(((VideoEntity) obj).getVideoId());
                f0VarO11.getClass();
                return !f0.r(numValueOf9);
        }
    }
}
