package com.strmr.ps.data.local.dao;

import androidx.media3.container.NalUnitUtil;
import androidx.media3.extractor.text.ttml.TtmlNode;
import com.strmr.ps.data.local.entity.CachedContent;
import defpackage.ck1;
import defpackage.e6a;
import defpackage.in4;
import defpackage.kp6;
import defpackage.pq6;
import defpackage.rm7;
import defpackage.s38;
import defpackage.ts9;
import defpackage.up1;
import java.util.List;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;

/* JADX INFO: loaded from: classes3.dex */
@up1
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\t\n\u0000\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u000f\bg\u0018\u00002\u00020\u0001J\u001e\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u00042\u0006\u0010\u0003\u001a\u00020\u0002H§@¢\u0006\u0004\b\u0006\u0010\u0007J\u001a\u0010\t\u001a\u0004\u0018\u00010\u00052\u0006\u0010\b\u001a\u00020\u0002H§@¢\u0006\u0004\b\t\u0010\u0007J\u001a\u0010\u000b\u001a\u0004\u0018\u00010\n2\u0006\u0010\u0003\u001a\u00020\u0002H§@¢\u0006\u0004\b\u000b\u0010\u0007J.\u0010\u000f\u001a\b\u0012\u0004\u0012\u00020\u00050\u00042\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\r\u001a\u00020\f2\u0006\u0010\u000e\u001a\u00020\fH§@¢\u0006\u0004\b\u000f\u0010\u0010J\u001e\u0010\u0013\u001a\u00020\u00122\f\u0010\u0011\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004H§@¢\u0006\u0004\b\u0013\u0010\u0014J\u0018\u0010\u0015\u001a\u00020\u00122\u0006\u0010\u0003\u001a\u00020\u0002H§@¢\u0006\u0004\b\u0015\u0010\u0007J(\u0010\u0018\u001a\u00020\u00122\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0016\u001a\u00020\f2\u0006\u0010\u0017\u001a\u00020\fH§@¢\u0006\u0004\b\u0018\u0010\u0010J\u0018\u0010\u001a\u001a\u00020\u00122\u0006\u0010\u0019\u001a\u00020\nH§@¢\u0006\u0004\b\u001a\u0010\u001bJ\u0010\u0010\u001c\u001a\u00020\u0012H§@¢\u0006\u0004\b\u001c\u0010\u001dJ&\u0010\u001e\u001a\u00020\u00122\u0006\u0010\u0003\u001a\u00020\u00022\f\u0010\u0011\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004H\u0097@¢\u0006\u0004\b\u001e\u0010\u001fJ\u0018\u0010 \u001a\u00020\f2\u0006\u0010\u0003\u001a\u00020\u0002H§@¢\u0006\u0004\b \u0010\u0007¨\u0006!"}, d2 = {"Lcom/strmr/ps/data/local/dao/CachedContentDao;", "", "", "category", "", "Lcom/strmr/ps/data/local/entity/CachedContent;", "getContentByCategory", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", TtmlNode.ATTR_ID, "getContentById", "", "getCategoryTimestamp", "", "limit", "offset", "getContentPage", "(Ljava/lang/String;IILkotlin/coroutines/Continuation;)Ljava/lang/Object;", "content", "Le6a;", "insertContent", "(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "deleteCategoryContent", TtmlNode.START, TtmlNode.END, "deleteRange", "timestamp", "deleteOldContent", "(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "deleteAllContent", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "replaceCategoryContent", "(Ljava/lang/String;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "getCategoryCount", "app_sideloadRelease"}, k = 1, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
public interface CachedContentDao {

    @Metadata(k = 3, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
    public static final class DefaultImpls {
        /* JADX WARN: Code restructure failed: missing block: B:20:0x005a, code lost:
        
            if (r5.insertContent(r7, r0) == r1) goto L21;
         */
        /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
        @ts9
        @pq6
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public static Object replaceCategoryContent(@kp6 CachedContentDao cachedContentDao, @kp6 String str, @kp6 List<CachedContent> list, @kp6 Continuation<? super e6a> continuation) {
            AnonymousClass1 anonymousClass1;
            if (continuation instanceof AnonymousClass1) {
                anonymousClass1 = (AnonymousClass1) continuation;
                int i = anonymousClass1.label;
                if ((i & Integer.MIN_VALUE) != 0) {
                    anonymousClass1.label = i - Integer.MIN_VALUE;
                } else {
                    anonymousClass1 = new AnonymousClass1(continuation);
                }
            }
            Object obj = anonymousClass1.result;
            ck1 ck1Var = ck1.a;
            int i2 = anonymousClass1.label;
            if (i2 == 0) {
                s38.b(obj);
                anonymousClass1.L$0 = cachedContentDao;
                anonymousClass1.L$1 = list;
                anonymousClass1.label = 1;
                if (cachedContentDao.deleteCategoryContent(str, anonymousClass1) != ck1Var) {
                }
                return ck1Var;
            }
            if (i2 != 1) {
                if (i2 != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                s38.b(obj);
                return e6a.a;
            }
            list = (List) anonymousClass1.L$1;
            cachedContentDao = (CachedContentDao) anonymousClass1.L$0;
            s38.b(obj);
            anonymousClass1.L$0 = null;
            anonymousClass1.L$1 = null;
            anonymousClass1.label = 2;
        }
    }

    /* JADX INFO: renamed from: com.strmr.ps.data.local.dao.CachedContentDao$replaceCategoryContent$1, reason: invalid class name */
    @Metadata(k = 3, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
    @DebugMetadata(c = "com.strmr.ps.data.local.dao.CachedContentDao$DefaultImpls", f = "CachedContentDao.kt", i = {0, 0}, l = {56, 57}, m = "replaceCategoryContent", n = {"$this", "content"}, s = {"L$0", "L$1"})
    public static final class AnonymousClass1 extends ContinuationImpl {
        Object L$0;
        Object L$1;
        int label;
        /* synthetic */ Object result;

        public AnonymousClass1(Continuation<? super AnonymousClass1> continuation) {
            super(continuation);
        }

        @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
        @pq6
        public final Object invokeSuspend(@kp6 Object obj) {
            this.result = obj;
            this.label |= Integer.MIN_VALUE;
            return DefaultImpls.replaceCategoryContent(null, null, null, this);
        }
    }

    @pq6
    @rm7
    Object deleteAllContent(@kp6 Continuation<? super e6a> continuation);

    @pq6
    @rm7
    Object deleteCategoryContent(@kp6 String str, @kp6 Continuation<? super e6a> continuation);

    @pq6
    @rm7
    Object deleteOldContent(long j, @kp6 Continuation<? super e6a> continuation);

    @pq6
    @rm7
    Object deleteRange(@kp6 String str, int i, int i2, @kp6 Continuation<? super e6a> continuation);

    @pq6
    @rm7
    Object getCategoryCount(@kp6 String str, @kp6 Continuation<? super Integer> continuation);

    @pq6
    @rm7
    Object getCategoryTimestamp(@kp6 String str, @kp6 Continuation<? super Long> continuation);

    @pq6
    @rm7
    Object getContentByCategory(@kp6 String str, @kp6 Continuation<? super List<CachedContent>> continuation);

    @pq6
    @rm7
    Object getContentById(@kp6 String str, @kp6 Continuation<? super CachedContent> continuation);

    @pq6
    @rm7
    Object getContentPage(@kp6 String str, int i, int i2, @kp6 Continuation<? super List<CachedContent>> continuation);

    @in4
    @pq6
    Object insertContent(@kp6 List<CachedContent> list, @kp6 Continuation<? super e6a> continuation);

    @ts9
    @pq6
    Object replaceCategoryContent(@kp6 String str, @kp6 List<CachedContent> list, @kp6 Continuation<? super e6a> continuation);
}
