package com.vinfast.companion.serviceskit.manager;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes6.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.companion.serviceskit.manager.BookingServiceManager$scheduleAppointment$$inlined$flatMapLatest$1", f = "BookingServiceManager.kt", l = {189}, m = "invokeSuspend", v = 1)
@kotlin.jvm.internal.SourceDebugExtension
public final class BookingServiceManager$scheduleAppointment$$inlined$flatMapLatest$1 extends kotlin.coroutines.jvm.internal.SuspendLambda implements kotlin.jvm.functions.Function3<kotlinx.coroutines.flow.FlowCollector<? super kotlin.Unit>, java.util.List<? extends com.vinfast.companion.serviceskit.domain.model.UploadFileData>, 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.companion.serviceskit.manager.BookingServiceManager q;
    final /* synthetic */ com.vinfast.companion.serviceskit.domain.model.ScheduleFlow r;
    final /* synthetic */ java.lang.String s;
    final /* synthetic */ com.vinfast.companion.core.base.ui.widget.dialog.editcontact.Contact t;
    final /* synthetic */ java.util.List u;
    final /* synthetic */ java.lang.String v;
    final /* synthetic */ java.lang.String w;
    final /* synthetic */ com.vinfast.companion.serviceskit.domain.model.PickUpMyCarInfo x;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public BookingServiceManager$scheduleAppointment$$inlined$flatMapLatest$1(kotlin.coroutines.Continuation continuation, com.vinfast.companion.serviceskit.manager.BookingServiceManager bookingServiceManager, com.vinfast.companion.serviceskit.domain.model.ScheduleFlow scheduleFlow, java.lang.String str, com.vinfast.companion.core.base.ui.widget.dialog.editcontact.Contact contact, java.util.List list, java.lang.String str2, java.lang.String str3, com.vinfast.companion.serviceskit.domain.model.PickUpMyCarInfo pickUpMyCarInfo) {
        super(3, continuation);
        this.q = bookingServiceManager;
        this.r = scheduleFlow;
        this.s = str;
        this.t = contact;
        this.u = list;
        this.v = str2;
        this.w = str3;
        this.x = pickUpMyCarInfo;
    }

    /* 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.companion.serviceskit.manager.BookingServiceManager$scheduleAppointment$$inlined$flatMapLatest$1 bookingServiceManager$scheduleAppointment$$inlined$flatMapLatest$1 = new com.vinfast.companion.serviceskit.manager.BookingServiceManager$scheduleAppointment$$inlined$flatMapLatest$1(continuation, this.q, this.r, this.s, this.t, this.u, this.v, this.w, this.x);
        bookingServiceManager$scheduleAppointment$$inlined$flatMapLatest$1.o = flowCollector;
        bookingServiceManager$scheduleAppointment$$inlined$flatMapLatest$1.p = obj;
        return bookingServiceManager$scheduleAppointment$$inlined$flatMapLatest$1.invokeSuspend(kotlin.Unit.a);
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.NoWhenBranchMatchedException */
    public final java.lang.Object invokeSuspend(java.lang.Object obj) throws kotlin.NoWhenBranchMatchedException {
        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;
            java.util.List list = (java.util.List) obj2;
            com.vinfast.companion.serviceskit.manager.BookingServiceManager bookingServiceManager = this.q;
            com.vinfast.companion.serviceskit.domain.model.ScheduleFlow scheduleFlow = this.r;
            java.lang.String str = this.s;
            com.vinfast.companion.core.base.ui.widget.dialog.editcontact.Contact contact = this.t;
            java.util.List list2 = this.u;
            java.lang.String str2 = this.v;
            java.lang.String str3 = this.w;
            if (list.isEmpty()) {
                list = null;
            }
            kotlinx.coroutines.flow.Flow flowN = bookingServiceManager.N(scheduleFlow, str, contact, list2, str2, str3, list, this.x);
            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, flowN, 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;
    }
}
