package com.vinfast.vehicle.installmentcontract;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes15.dex */
@kotlin.Metadata(d1 = {"\u0000\u0012\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u0003*\b\u0012\u0004\u0012\u0002H\u00020\u00042\u0006\u0010\u0005\u001a\u0002H\u0003H\n¨\u0006\u0006"}, d2 = {"<anonymous>", "", "R", "T", "Lkotlinx/coroutines/flow/FlowCollector;", "it", "kotlinx/coroutines/flow/FlowKt__MergeKt$flatMapLatest$1"}, k = 3, mv = {2, 2, 0}, xi = 48)
@kotlin.coroutines.jvm.internal.DebugMetadata(c = "com.vinfast.vehicle.installmentcontract.VehicleInstallmentCarViewModel$fetch$$inlined$flatMapLatest$1", f = "VehicleInstallmentCarViewModel.kt", l = {189}, m = "invokeSuspend", v = 1)
@kotlin.jvm.internal.SourceDebugExtension
public final class VehicleInstallmentCarViewModel$fetch$$inlined$flatMapLatest$1 extends kotlin.coroutines.jvm.internal.SuspendLambda implements kotlin.jvm.functions.Function3<kotlinx.coroutines.flow.FlowCollector<? super com.vinfast.companion.vehiclekit.model.VehicleInstallmentContract>, com.vinfast.companion.vehiclekit.data.persistent.model.Vehicle, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object> {
    int n;
    private /* synthetic */ java.lang.Object o;
    /* synthetic */ java.lang.Object p;
    final /* synthetic */ com.vinfast.vehicle.installmentcontract.VehicleInstallmentCarViewModel q;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public VehicleInstallmentCarViewModel$fetch$$inlined$flatMapLatest$1(kotlin.coroutines.Continuation continuation, com.vinfast.vehicle.installmentcontract.VehicleInstallmentCarViewModel vehicleInstallmentCarViewModel) {
        super(3, continuation);
        this.q = vehicleInstallmentCarViewModel;
    }

    /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
    public final java.lang.Object invoke(kotlinx.coroutines.flow.FlowCollector flowCollector, java.lang.Object obj, kotlin.coroutines.Continuation continuation) {
        com.vinfast.vehicle.installmentcontract.VehicleInstallmentCarViewModel$fetch$$inlined$flatMapLatest$1 vehicleInstallmentCarViewModel$fetch$$inlined$flatMapLatest$1 = new com.vinfast.vehicle.installmentcontract.VehicleInstallmentCarViewModel$fetch$$inlined$flatMapLatest$1(continuation, this.q);
        vehicleInstallmentCarViewModel$fetch$$inlined$flatMapLatest$1.o = flowCollector;
        vehicleInstallmentCarViewModel$fetch$$inlined$flatMapLatest$1.p = obj;
        return vehicleInstallmentCarViewModel$fetch$$inlined$flatMapLatest$1.invokeSuspend(kotlin.Unit.a);
    }

    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.FlowCollector flowCollector = (kotlinx.coroutines.flow.FlowCollector) this.o;
            java.lang.Object obj2 = this.p;
            kotlinx.coroutines.flow.Flow flowC0 = kotlinx.coroutines.flow.FlowKt.c0(kotlinx.coroutines.flow.FlowKt.i(kotlinx.coroutines.flow.FlowKt.d0(this.q.getVehicleInstallmentContractUseCase.a(((com.vinfast.companion.vehiclekit.data.persistent.model.Vehicle) obj2).J()), new com.vinfast.vehicle.installmentcontract.VehicleInstallmentCarViewModel$fetch$1$1(this.q, null)), new com.vinfast.vehicle.installmentcontract.VehicleInstallmentCarViewModel$fetch$1$2(this.q, null)), new com.vinfast.vehicle.installmentcontract.VehicleInstallmentCarViewModel$fetch$1$3(this.q, null));
            this.o = kotlin.coroutines.jvm.internal.SpillingKt.a(flowCollector);
            this.p = kotlin.coroutines.jvm.internal.SpillingKt.a(obj2);
            this.n = 1;
            if (kotlinx.coroutines.flow.FlowKt.B(flowCollector, 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;
    }
}
