package com.vinfast.companion.serviceskit.data.repository;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes6.dex */
@kotlin.Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\u0010\u0000\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00030\u0002H\n"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/flow/FlowCollector;", ""}, k = 3, mv = {2, 2, 0}, xi = 48)
@kotlin.coroutines.jvm.internal.DebugMetadata(c = "com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider$updateServiceCenterReservedTimeSlot$1", f = "BookingServiceRepositoryProvider.kt", l = {88, 89}, m = "invokeSuspend", v = 1)
final class BookingServiceRepositoryProvider$updateServiceCenterReservedTimeSlot$1 extends kotlin.coroutines.jvm.internal.SuspendLambda implements kotlin.jvm.functions.Function2<kotlinx.coroutines.flow.FlowCollector<? super java.lang.String>, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object> {
    java.lang.Object n;
    java.lang.Object o;
    int p;
    private /* synthetic */ java.lang.Object q;
    final /* synthetic */ java.lang.String r;
    final /* synthetic */ java.lang.String s;
    final /* synthetic */ java.lang.Integer[] t;
    final /* synthetic */ long u;
    final /* synthetic */ com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    BookingServiceRepositoryProvider$updateServiceCenterReservedTimeSlot$1(java.lang.String str, java.lang.String str2, java.lang.Integer[] numArr, long j, com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider bookingServiceRepositoryProvider, kotlin.coroutines.Continuation continuation) {
        super(2, continuation);
        this.r = str;
        this.s = str2;
        this.t = numArr;
        this.u = j;
        this.v = bookingServiceRepositoryProvider;
    }

    /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
    public final java.lang.Object invoke(kotlinx.coroutines.flow.FlowCollector flowCollector, kotlin.coroutines.Continuation continuation) {
        return create(flowCollector, continuation).invokeSuspend(kotlin.Unit.a);
    }

    public final kotlin.coroutines.Continuation create(java.lang.Object obj, kotlin.coroutines.Continuation continuation) {
        com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider$updateServiceCenterReservedTimeSlot$1 bookingServiceRepositoryProvider$updateServiceCenterReservedTimeSlot$1 = new com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider$updateServiceCenterReservedTimeSlot$1(this.r, this.s, this.t, this.u, this.v, continuation);
        bookingServiceRepositoryProvider$updateServiceCenterReservedTimeSlot$1.q = obj;
        return bookingServiceRepositoryProvider$updateServiceCenterReservedTimeSlot$1;
    }

    /* JADX WARN: Code restructure failed: missing block: B:19:0x0081, code lost:
    
        if (r0.emit(r4, r11) == r1) goto L20;
     */
    /*
        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 r12) {
        /*
            r11 = this;
            java.lang.Object r0 = r11.q
            kotlinx.coroutines.flow.FlowCollector r0 = (kotlinx.coroutines.flow.FlowCollector) r0
            java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.g()
            int r2 = r11.p
            r3 = 2
            r4 = 1
            if (r2 == 0) goto L2e
            if (r2 == r4) goto L26
            if (r2 != r3) goto L1e
            java.lang.Object r0 = r11.o
            com.vinfast.companion.core.base.BaseResponse r0 = (com.vinfast.companion.core.base.BaseResponse) r0
            java.lang.Object r11 = r11.n
            com.vinfast.companion.serviceskit.domain.request.UpdateReservedTimeSlotServiceCenterRequest r11 = (com.vinfast.companion.serviceskit.domain.request.UpdateReservedTimeSlotServiceCenterRequest) r11
            kotlin.ResultKt.b(r12)
            goto L84
        L1e:
            java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
            java.lang.String r12 = "call to 'resume' before 'invoke' with coroutine"
            r11.<init>(r12)
            throw r11
        L26:
            java.lang.Object r2 = r11.n
            com.vinfast.companion.serviceskit.domain.request.UpdateReservedTimeSlotServiceCenterRequest r2 = (com.vinfast.companion.serviceskit.domain.request.UpdateReservedTimeSlotServiceCenterRequest) r2
            kotlin.ResultKt.b(r12)
            goto L56
        L2e:
            kotlin.ResultKt.b(r12)
            com.vinfast.companion.serviceskit.domain.request.UpdateReservedTimeSlotServiceCenterRequest r5 = new com.vinfast.companion.serviceskit.domain.request.UpdateReservedTimeSlotServiceCenterRequest
            java.lang.String r6 = r11.r
            java.lang.String r7 = r11.s
            java.lang.Integer[] r8 = r11.t
            long r9 = r11.u
            r5.<init>(r6, r7, r8, r9)
            com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider r12 = r11.v
            com.vinfast.companion.serviceskit.data.api.BookingServiceApi r12 = com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider.p(r12)
            r11.q = r0
            java.lang.Object r2 = kotlin.coroutines.jvm.internal.SpillingKt.a(r5)
            r11.n = r2
            r11.p = r4
            java.lang.Object r12 = r12.m(r5, r11)
            if (r12 != r1) goto L55
            goto L83
        L55:
            r2 = r5
        L56:
            com.vinfast.companion.core.base.BaseResponse r12 = (com.vinfast.companion.core.base.BaseResponse) r12
            java.lang.Object r4 = r12.a()
            com.vinfast.companion.serviceskit.domain.response.TimeSlotReservationDto r4 = (com.vinfast.companion.serviceskit.domain.response.TimeSlotReservationDto) r4
            if (r4 == 0) goto L65
            java.lang.String r4 = r4.getAppointmentId()
            goto L66
        L65:
            r4 = 0
        L66:
            kotlin.jvm.internal.Intrinsics.i(r4)
            java.lang.Object r5 = kotlin.coroutines.jvm.internal.SpillingKt.a(r0)
            r11.q = r5
            java.lang.Object r2 = kotlin.coroutines.jvm.internal.SpillingKt.a(r2)
            r11.n = r2
            java.lang.Object r12 = kotlin.coroutines.jvm.internal.SpillingKt.a(r12)
            r11.o = r12
            r11.p = r3
            java.lang.Object r11 = r0.emit(r4, r11)
            if (r11 != r1) goto L84
        L83:
            return r1
        L84:
            kotlin.Unit r11 = kotlin.Unit.a
            return r11
        */
        throw new UnsupportedOperationException("Method not decompiled: com.vinfast.companion.serviceskit.data.repository.BookingServiceRepositoryProvider$updateServiceCenterReservedTimeSlot$1.invokeSuspend(java.lang.Object):java.lang.Object");
    }
}
