package com.vinfast.companion.corecompose;

/* 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.corecompose.BaseViewModel$sendAction$1", f = "BaseComposeViewModel.kt", l = {125, 127}, m = "invokeSuspend", v = 1)
final class BaseViewModel$sendAction$1 extends kotlin.coroutines.jvm.internal.SuspendLambda implements kotlin.jvm.functions.Function2<kotlinx.coroutines.CoroutineScope, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object> {
    long n;
    int o;
    int p;
    final /* synthetic */ java.lang.Long q;
    final /* synthetic */ com.vinfast.companion.corecompose.BaseViewModel r;
    final /* synthetic */ com.vinfast.companion.corecompose.BaseAction s;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    BaseViewModel$sendAction$1(java.lang.Long l, com.vinfast.companion.corecompose.BaseViewModel baseViewModel, com.vinfast.companion.corecompose.BaseAction baseAction, kotlin.coroutines.Continuation continuation) {
        super(2, continuation);
        this.q = l;
        this.r = baseViewModel;
        this.s = baseAction;
    }

    public final kotlin.coroutines.Continuation create(java.lang.Object obj, kotlin.coroutines.Continuation continuation) {
        return new com.vinfast.companion.corecompose.BaseViewModel$sendAction$1(this.q, this.r, this.s, continuation);
    }

    /* JADX WARN: Code restructure failed: missing block: B:16:0x004d, code lost:
    
        if (r9.emit(r1, r8) == r0) goto L17;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.Object invokeSuspend(java.lang.Object r9) {
        /*
            r8 = this;
            java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.g()
            int r1 = r8.p
            r2 = 2
            r3 = 1
            if (r1 == 0) goto L1e
            if (r1 == r3) goto L1a
            if (r1 != r2) goto L12
            kotlin.ResultKt.b(r9)
            goto L50
        L12:
            java.lang.IllegalStateException r8 = new java.lang.IllegalStateException
            java.lang.String r9 = "call to 'resume' before 'invoke' with coroutine"
            r8.<init>(r9)
            throw r8
        L1a:
            kotlin.ResultKt.b(r9)
            goto L3f
        L1e:
            kotlin.ResultKt.b(r9)
            java.lang.Long r9 = r8.q
            if (r9 == 0) goto L3f
            long r4 = r9.longValue()
            kotlin.time.Duration$Companion r9 = kotlin.time.Duration.b
            kotlin.time.DurationUnit r9 = kotlin.time.DurationUnit.MILLISECONDS
            long r6 = kotlin.time.DurationKt.D(r4, r9)
            r8.n = r4
            r9 = 0
            r8.o = r9
            r8.p = r3
            java.lang.Object r9 = kotlinx.coroutines.DelayKt.c(r6, r8)
            if (r9 != r0) goto L3f
            goto L4f
        L3f:
            com.vinfast.companion.corecompose.BaseViewModel r9 = r8.r
            kotlinx.coroutines.flow.MutableSharedFlow r9 = com.vinfast.companion.corecompose.BaseViewModel.e(r9)
            com.vinfast.companion.corecompose.BaseAction r1 = r8.s
            r8.p = r2
            java.lang.Object r8 = r9.emit(r1, r8)
            if (r8 != r0) goto L50
        L4f:
            return r0
        L50:
            kotlin.Unit r8 = kotlin.Unit.a
            return r8
        */
        throw new UnsupportedOperationException("Method not decompiled: com.vinfast.companion.corecompose.BaseViewModel$sendAction$1.invokeSuspend(java.lang.Object):java.lang.Object");
    }

    public final java.lang.Object invoke(kotlinx.coroutines.CoroutineScope coroutineScope, kotlin.coroutines.Continuation continuation) {
        return create(coroutineScope, continuation).invokeSuspend(kotlin.Unit.a);
    }
}
