package com.revenuecat.purchases.ui.revenuecatui.components.video;

import C4.e;
import C4.j;
import V4.C;
import V4.E;
import com.revenuecat.purchases.models.Checksum;
import com.revenuecat.purchases.paywalls.components.properties.VideoUrls;
import com.revenuecat.purchases.storage.FileRepository;
import java.net.URL;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: loaded from: classes3.dex */
@e(c = "com.revenuecat.purchases.ui.revenuecatui.components.video.VideoComponentViewKt$rememberVideoContentState$1$1", f = "VideoComponentView.kt", l = {}, m = "invokeSuspend")
public final class VideoComponentViewKt$rememberVideoContentState$1$1 extends j implements J4.e {
    final /* synthetic */ FileRepository $repository;
    final /* synthetic */ VideoUrls $videoUrls;
    private /* synthetic */ Object L$0;
    int label;

    /* JADX INFO: renamed from: com.revenuecat.purchases.ui.revenuecatui.components.video.VideoComponentViewKt$rememberVideoContentState$1$1$1, reason: invalid class name */
    @e(c = "com.revenuecat.purchases.ui.revenuecatui.components.video.VideoComponentViewKt$rememberVideoContentState$1$1$1", f = "VideoComponentView.kt", l = {148}, m = "invokeSuspend")
    public static final class AnonymousClass1 extends j implements J4.e {
        final /* synthetic */ FileRepository $repository;
        final /* synthetic */ VideoUrls $videoUrls;
        int label;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public AnonymousClass1(VideoUrls videoUrls, FileRepository fileRepository, A4.d dVar) {
            super(2, dVar);
            this.$videoUrls = videoUrls;
            this.$repository = fileRepository;
        }

        @Override // C4.a
        public final A4.d create(Object obj, A4.d dVar) {
            return new AnonymousClass1(this.$videoUrls, this.$repository, dVar);
        }

        @Override // J4.e
        public final Object invoke(C c6, A4.d dVar) {
            return ((AnonymousClass1) create(c6, dVar)).invokeSuspend(C3137A.f25453a);
        }

        @Override // C4.a
        public final Object invokeSuspend(Object obj) {
            B4.a aVar = B4.a.f492a;
            int i6 = this.label;
            if (i6 == 0) {
                AbstractC2467b.l(obj);
                URL url = this.$videoUrls.getUrl();
                Checksum checksum = this.$videoUrls.getChecksum();
                FileRepository fileRepository = this.$repository;
                this.label = 1;
                if (VideoComponentViewKt.cacheVideo(url, checksum, fileRepository, this) == aVar) {
                    return aVar;
                }
            } else {
                if (i6 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
            }
            return C3137A.f25453a;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public VideoComponentViewKt$rememberVideoContentState$1$1(VideoUrls videoUrls, FileRepository fileRepository, A4.d dVar) {
        super(2, dVar);
        this.$videoUrls = videoUrls;
        this.$repository = fileRepository;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        VideoComponentViewKt$rememberVideoContentState$1$1 videoComponentViewKt$rememberVideoContentState$1$1 = new VideoComponentViewKt$rememberVideoContentState$1$1(this.$videoUrls, this.$repository, dVar);
        videoComponentViewKt$rememberVideoContentState$1$1.L$0 = obj;
        return videoComponentViewKt$rememberVideoContentState$1$1;
    }

    @Override // J4.e
    public final Object invoke(C c6, A4.d dVar) {
        return ((VideoComponentViewKt$rememberVideoContentState$1$1) create(c6, dVar)).invokeSuspend(C3137A.f25453a);
    }

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        if (this.label != 0) {
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
        AbstractC2467b.l(obj);
        C c6 = (C) this.L$0;
        E.y(c6, null, null, new AnonymousClass1(this.$videoUrls, this.$repository, null), 3);
        URL urlLowRes = this.$videoUrls.getUrlLowRes();
        if (urlLowRes != null) {
            if (urlLowRes.equals(this.$videoUrls.getUrl())) {
                urlLowRes = null;
            }
            if (urlLowRes != null) {
                E.y(c6, null, null, new VideoComponentViewKt$rememberVideoContentState$1$1$3$1(urlLowRes, this.$videoUrls, this.$repository, null), 3);
            }
        }
        return C3137A.f25453a;
    }
}
