package com.revenuecat.purchases.ui.revenuecatui.defaultpaywall;

import A4.d;
import B4.a;
import C4.e;
import C4.j;
import V4.C;
import V4.E;
import V4.N;
import android.content.Context;
import android.graphics.Bitmap;
import androidx.compose.runtime.MutableState;
import com.google.android.gms.location.LocationRequest;
import com.revenuecat.purchases.ui.revenuecatui.helpers.AppStyleExtractor;
import java.util.List;
import m3.AbstractC2467b;
import p0.C2714u;
import w4.C3137A;

/* JADX INFO: loaded from: classes3.dex */
@e(c = "com.revenuecat.purchases.ui.revenuecatui.defaultpaywall.DefaultPaywallViewKt$DefaultPaywallView$1$1", f = "DefaultPaywallView.kt", l = {100, LocationRequest.PRIORITY_LOW_POWER}, m = "invokeSuspend")
public final class DefaultPaywallViewKt$DefaultPaywallView$1$1 extends j implements J4.e {
    final /* synthetic */ MutableState<Bitmap> $appIconBitmap$delegate;
    final /* synthetic */ Context $context;
    final /* synthetic */ MutableState<List<C2714u>> $prominentColors$delegate;
    final /* synthetic */ List<C2714u> $providedProminentColors;
    Object L$0;
    int label;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public DefaultPaywallViewKt$DefaultPaywallView$1$1(List<C2714u> list, MutableState<Bitmap> mutableState, MutableState<List<C2714u>> mutableState2, Context context, d dVar) {
        super(2, dVar);
        this.$providedProminentColors = list;
        this.$appIconBitmap$delegate = mutableState;
        this.$prominentColors$delegate = mutableState2;
        this.$context = context;
    }

    @Override // C4.a
    public final d create(Object obj, d dVar) {
        return new DefaultPaywallViewKt$DefaultPaywallView$1$1(this.$providedProminentColors, this.$appIconBitmap$delegate, this.$prominentColors$delegate, this.$context, dVar);
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:13:0x0040, code lost:
    
        if (r12 == r0) goto L21;
     */
    /* JADX WARN: Code restructure failed: missing block: B:20:0x0064, code lost:
    
        if (r12 == r0) goto L21;
     */
    /* JADX WARN: Code restructure failed: missing block: B:21:0x0066, code lost:
    
        return r0;
     */
    /* JADX WARN: Removed duplicated region for block: B:19:0x0052  */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        DefaultPaywallViewKt$DefaultPaywallView$1$1 defaultPaywallViewKt$DefaultPaywallView$1$1;
        MutableState<List<C2714u>> mutableState;
        a aVar = a.f492a;
        int i6 = this.label;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            if (this.$providedProminentColors != null) {
                defaultPaywallViewKt$DefaultPaywallView$1$1 = this;
                if (DefaultPaywallViewKt.DefaultPaywallView$lambda$3(defaultPaywallViewKt$DefaultPaywallView$1$1.$appIconBitmap$delegate) == null) {
                    c5.e eVar = N.f8259a;
                    DefaultPaywallViewKt$DefaultPaywallView$1$1$bitmap$1 defaultPaywallViewKt$DefaultPaywallView$1$1$bitmap$1 = new DefaultPaywallViewKt$DefaultPaywallView$1$1$bitmap$1(defaultPaywallViewKt$DefaultPaywallView$1$1.$context, null);
                    defaultPaywallViewKt$DefaultPaywallView$1$1.L$0 = null;
                    defaultPaywallViewKt$DefaultPaywallView$1$1.label = 2;
                    obj = E.H(eVar, defaultPaywallViewKt$DefaultPaywallView$1$1$bitmap$1, this);
                }
                return C3137A.f25453a;
            }
            mutableState = this.$prominentColors$delegate;
            AppStyleExtractor appStyleExtractor = AppStyleExtractor.INSTANCE;
            Bitmap bitmapDefaultPaywallView$lambda$3 = DefaultPaywallViewKt.DefaultPaywallView$lambda$3(this.$appIconBitmap$delegate);
            this.L$0 = mutableState;
            this.label = 1;
            defaultPaywallViewKt$DefaultPaywallView$1$1 = this;
            obj = AppStyleExtractor.getProminentColorsFromBitmap$default(appStyleExtractor, bitmapDefaultPaywallView$lambda$3, 2, null, defaultPaywallViewKt$DefaultPaywallView$1$1, 4, null);
        } else {
            if (i6 != 1) {
                if (i6 != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
                defaultPaywallViewKt$DefaultPaywallView$1$1 = this;
                defaultPaywallViewKt$DefaultPaywallView$1$1.$appIconBitmap$delegate.setValue((Bitmap) obj);
                return C3137A.f25453a;
            }
            mutableState = (MutableState) this.L$0;
            AbstractC2467b.l(obj);
            defaultPaywallViewKt$DefaultPaywallView$1$1 = this;
        }
        mutableState.setValue((List) obj);
        if (DefaultPaywallViewKt.DefaultPaywallView$lambda$3(defaultPaywallViewKt$DefaultPaywallView$1$1.$appIconBitmap$delegate) == null) {
        }
        return C3137A.f25453a;
    }
}
