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\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.data.repository.ContactUsRepositoryProvider$updateFullComplaint$$inlined$flatMapLatest$1", f = "ContactUsRepositoryProvider.kt", l = {189}, m = "invokeSuspend", v = 1)
@kotlin.jvm.internal.SourceDebugExtension
public final class ContactUsRepositoryProvider$updateFullComplaint$$inlined$flatMapLatest$1 extends kotlin.coroutines.jvm.internal.SuspendLambda implements kotlin.jvm.functions.Function3<kotlinx.coroutines.flow.FlowCollector<? super kotlin.Unit>, java.util.ArrayList<com.vinfast.companion.serviceskit.data.persistent.model.complaint.UploadFileComplaint>, 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.data.repository.ContactUsRepositoryProvider q;
    final /* synthetic */ com.vinfast.companion.serviceskit.domain.request.UpdateComplainRequest r;
    final /* synthetic */ java.lang.String s;
    final /* synthetic */ boolean t;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public ContactUsRepositoryProvider$updateFullComplaint$$inlined$flatMapLatest$1(kotlin.coroutines.Continuation continuation, com.vinfast.companion.serviceskit.data.repository.ContactUsRepositoryProvider contactUsRepositoryProvider, com.vinfast.companion.serviceskit.domain.request.UpdateComplainRequest updateComplainRequest, java.lang.String str, boolean z) {
        super(3, continuation);
        this.q = contactUsRepositoryProvider;
        this.r = updateComplainRequest;
        this.s = str;
        this.t = z;
    }

    /* 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.data.repository.ContactUsRepositoryProvider$updateFullComplaint$$inlined$flatMapLatest$1 contactUsRepositoryProvider$updateFullComplaint$$inlined$flatMapLatest$1 = new com.vinfast.companion.serviceskit.data.repository.ContactUsRepositoryProvider$updateFullComplaint$$inlined$flatMapLatest$1(continuation, this.q, this.r, this.s, this.t);
        contactUsRepositoryProvider$updateFullComplaint$$inlined$flatMapLatest$1.o = flowCollector;
        contactUsRepositoryProvider$updateFullComplaint$$inlined$flatMapLatest$1.p = obj;
        return contactUsRepositoryProvider$updateFullComplaint$$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;
            java.util.ArrayList arrayListR = this.q.r((java.util.ArrayList) obj2);
            com.vinfast.companion.serviceskit.domain.request.UpdateComplainRequest updateComplainRequest = this.r;
            java.lang.Object obj3 = arrayListR.get(0);
            kotlin.jvm.internal.Intrinsics.k(obj3, "get(...)");
            if (((java.lang.CharSequence) obj3).length() == 0) {
                updateComplainRequest.a(null);
            } else {
                updateComplainRequest.a((java.lang.String) arrayListR.get(0));
            }
            java.lang.Object obj4 = arrayListR.get(1);
            kotlin.jvm.internal.Intrinsics.k(obj4, "get(...)");
            if (((java.lang.CharSequence) obj4).length() == 0) {
                updateComplainRequest.b(null);
            } else {
                updateComplainRequest.b((java.lang.String) arrayListR.get(1));
            }
            java.lang.Object obj5 = arrayListR.get(2);
            kotlin.jvm.internal.Intrinsics.k(obj5, "get(...)");
            if (((java.lang.CharSequence) obj5).length() == 0) {
                updateComplainRequest.c(null);
            } else {
                updateComplainRequest.c((java.lang.String) arrayListR.get(2));
            }
            java.lang.Object obj6 = arrayListR.get(3);
            kotlin.jvm.internal.Intrinsics.k(obj6, "get(...)");
            if (((java.lang.CharSequence) obj6).length() == 0) {
                updateComplainRequest.d(null);
            } else {
                updateComplainRequest.d((java.lang.String) arrayListR.get(3));
            }
            java.lang.Object obj7 = arrayListR.get(4);
            kotlin.jvm.internal.Intrinsics.k(obj7, "get(...)");
            if (((java.lang.CharSequence) obj7).length() == 0) {
                updateComplainRequest.e(null);
            } else {
                updateComplainRequest.e((java.lang.String) arrayListR.get(4));
            }
            timber.log.Timber.a.a("Request create full: " + com.vinfast.companion.core.extensions.ObjectExtensionKt.t(updateComplainRequest), new java.lang.Object[0]);
            kotlinx.coroutines.flow.Flow flowS = this.q.s(this.s, this.r, this.t);
            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, flowS, 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;
    }
}
