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

import A4.d;
import C4.j;
import J4.a;
import J4.e;
import V4.C;
import V4.E;
import androidx.compose.runtime.MutableState;
import androidx.media3.extractor.ts.TsExtractor;
import com.revenuecat.purchases.ui.revenuecatui.components.PaywallAction;
import com.revenuecat.purchases.ui.revenuecatui.components.button.ButtonComponentViewKt;
import com.revenuecat.purchases.ui.revenuecatui.data.PaywallState;
import kotlin.jvm.internal.p;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: loaded from: classes3.dex */
public final class ButtonComponentViewKt$ButtonComponentView$2$2$1 extends p implements a {
    final /* synthetic */ ButtonComponentState $buttonState;
    final /* synthetic */ C $coroutineScope;
    final /* synthetic */ MutableState<Boolean> $myActionInProgress$delegate;
    final /* synthetic */ e $onClick;
    final /* synthetic */ PaywallState.Loaded.Components $state;

    /* JADX INFO: renamed from: com.revenuecat.purchases.ui.revenuecatui.components.button.ButtonComponentViewKt$ButtonComponentView$2$2$1$1, reason: invalid class name */
    @C4.e(c = "com.revenuecat.purchases.ui.revenuecatui.components.button.ButtonComponentViewKt$ButtonComponentView$2$2$1$1", f = "ButtonComponentView.kt", l = {TsExtractor.TS_STREAM_TYPE_DTS_UHD}, m = "invokeSuspend")
    public static final class AnonymousClass1 extends j implements e {
        final /* synthetic */ ButtonComponentState $buttonState;
        final /* synthetic */ MutableState<Boolean> $myActionInProgress$delegate;
        final /* synthetic */ e $onClick;
        final /* synthetic */ PaywallState.Loaded.Components $state;
        int label;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public AnonymousClass1(e eVar, ButtonComponentState buttonComponentState, PaywallState.Loaded.Components components, MutableState<Boolean> mutableState, d dVar) {
            super(2, dVar);
            this.$onClick = eVar;
            this.$buttonState = buttonComponentState;
            this.$state = components;
            this.$myActionInProgress$delegate = mutableState;
        }

        @Override // C4.a
        public final d create(Object obj, d dVar) {
            return new AnonymousClass1(this.$onClick, this.$buttonState, this.$state, this.$myActionInProgress$delegate, dVar);
        }

        @Override // J4.e
        public final Object invoke(C c6, 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);
                e eVar = this.$onClick;
                PaywallAction action = this.$buttonState.getAction();
                this.label = 1;
                if (eVar.invoke(action, this) == aVar) {
                    return aVar;
                }
            } else {
                if (i6 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
            }
            ButtonComponentViewKt.AnonymousClass2.invoke$lambda$3(this.$myActionInProgress$delegate, false);
            PaywallState.Loaded.Components.update$default(this.$state, null, null, Boolean.FALSE, 3, null);
            return C3137A.f25453a;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public ButtonComponentViewKt$ButtonComponentView$2$2$1(PaywallState.Loaded.Components components, C c6, MutableState<Boolean> mutableState, e eVar, ButtonComponentState buttonComponentState) {
        super(0);
        this.$state = components;
        this.$coroutineScope = c6;
        this.$myActionInProgress$delegate = mutableState;
        this.$onClick = eVar;
        this.$buttonState = buttonComponentState;
    }

    @Override // J4.a
    public /* bridge */ /* synthetic */ Object invoke() {
        m663invoke();
        return C3137A.f25453a;
    }

    /* JADX INFO: renamed from: invoke, reason: collision with other method in class */
    public final void m663invoke() {
        ButtonComponentViewKt.AnonymousClass2.invoke$lambda$3(this.$myActionInProgress$delegate, true);
        PaywallState.Loaded.Components.update$default(this.$state, null, null, Boolean.TRUE, 3, null);
        E.y(this.$coroutineScope, null, null, new AnonymousClass1(this.$onClick, this.$buttonState, this.$state, this.$myActionInProgress$delegate, null), 3);
    }
}
