package com.vinfast.companion.core.managers;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes15.dex */
@kotlin.Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\n"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {2, 2, 0}, xi = 48)
@kotlin.coroutines.jvm.internal.DebugMetadata(c = "com.vinfast.companion.core.managers.FeatureScope$canUse$1", f = "FeatureAccess.kt", l = {302}, m = "invokeSuspend", v = 1)
final class FeatureScope$canUse$1 extends kotlin.coroutines.jvm.internal.SuspendLambda implements kotlin.jvm.functions.Function2<kotlinx.coroutines.CoroutineScope, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object> {
    int n;
    final /* synthetic */ com.vinfast.companion.core.managers.SOTAFeature o;
    final /* synthetic */ kotlin.jvm.functions.Function1 p;

    /* JADX INFO: renamed from: com.vinfast.companion.core.managers.FeatureScope$canUse$1$1, reason: invalid class name */
    /* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
    @kotlin.Metadata(k = 3, mv = {2, 2, 0}, xi = 48)
    static final /* synthetic */ class AnonymousClass1 extends kotlin.jvm.internal.AdaptedFunctionReference implements kotlin.jvm.functions.Function2<com.vinfast.companion.core.managers.SOTAPlan, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object>, kotlin.coroutines.jvm.internal.SuspendFunction {
        final /* synthetic */ com.vinfast.companion.core.managers.SOTAFeature h;
        final /* synthetic */ kotlin.jvm.functions.Function1 i;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        AnonymousClass1(com.vinfast.companion.core.managers.SOTAFeature sOTAFeature, kotlin.jvm.functions.Function1 function1) {
            super(2, kotlin.jvm.internal.Intrinsics.Kotlin.class, "execute", "canUse$execute(Lcom/vinfast/companion/core/managers/SOTAFeature;Lkotlin/jvm/functions/Function1;Lcom/vinfast/companion/core/managers/SOTAPlan;)V", 4);
            this.h = sOTAFeature;
            this.i = function1;
        }

        /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
        public final java.lang.Object invoke(com.vinfast.companion.core.managers.SOTAPlan sOTAPlan, kotlin.coroutines.Continuation continuation) {
            return com.vinfast.companion.core.managers.FeatureScope$canUse$1.j(this.h, this.i, sOTAPlan, continuation);
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    FeatureScope$canUse$1(com.vinfast.companion.core.managers.SOTAFeature sOTAFeature, kotlin.jvm.functions.Function1 function1, kotlin.coroutines.Continuation continuation) {
        super(2, continuation);
        this.o = sOTAFeature;
        this.p = function1;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final /* synthetic */ java.lang.Object j(com.vinfast.companion.core.managers.SOTAFeature sOTAFeature, kotlin.jvm.functions.Function1 function1, com.vinfast.companion.core.managers.SOTAPlan sOTAPlan, kotlin.coroutines.Continuation continuation) {
        com.vinfast.companion.core.managers.FeatureScope.d(sOTAFeature, function1, sOTAPlan);
        return kotlin.Unit.a;
    }

    public final kotlin.coroutines.Continuation create(java.lang.Object obj, kotlin.coroutines.Continuation continuation) {
        return new com.vinfast.companion.core.managers.FeatureScope$canUse$1(this.o, this.p, continuation);
    }

    public final java.lang.Object invokeSuspend(java.lang.Object obj) {
        java.lang.Object objG = kotlin.coroutines.intrinsics.IntrinsicsKt.g();
        int i = this.n;
        if (i == 0) {
            kotlin.ResultKt.b(obj);
            kotlinx.coroutines.flow.Flow flowC0 = kotlinx.coroutines.flow.FlowKt.c0(com.vinfast.companion.core.managers.FeatureAccess.INSTANCE.a().getCurrentPlan(), new com.vinfast.companion.core.managers.FeatureScope$canUse$1.AnonymousClass1(this.o, this.p));
            this.n = 1;
            if (kotlinx.coroutines.flow.FlowKt.l(flowC0, this) == objG) {
                return objG;
            }
        } else {
            if (i != 1) {
                throw new java.lang.IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            kotlin.ResultKt.b(obj);
        }
        return kotlin.Unit.a;
    }

    public final java.lang.Object invoke(kotlinx.coroutines.CoroutineScope coroutineScope, kotlin.coroutines.Continuation continuation) {
        return create(coroutineScope, continuation).invokeSuspend(kotlin.Unit.a);
    }
}
