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$createFullComplaintGlobal$$inlined$flatMapLatest$1", f = "ContactUsRepositoryProvider.kt", l = {189}, m = "invokeSuspend", v = 1)
@kotlin.jvm.internal.SourceDebugExtension
public final class ContactUsRepositoryProvider$createFullComplaintGlobal$$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.data.persistent.model.complaint.GlUploadFile>, 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.domain.request.GlComplaintRequest q;
    final /* synthetic */ com.vinfast.companion.serviceskit.data.repository.ContactUsRepositoryProvider r;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public ContactUsRepositoryProvider$createFullComplaintGlobal$$inlined$flatMapLatest$1(kotlin.coroutines.Continuation continuation, com.vinfast.companion.serviceskit.domain.request.GlComplaintRequest glComplaintRequest, com.vinfast.companion.serviceskit.data.repository.ContactUsRepositoryProvider contactUsRepositoryProvider) {
        super(3, continuation);
        this.q = glComplaintRequest;
        this.r = contactUsRepositoryProvider;
    }

    /* 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$createFullComplaintGlobal$$inlined$flatMapLatest$1 contactUsRepositoryProvider$createFullComplaintGlobal$$inlined$flatMapLatest$1 = new com.vinfast.companion.serviceskit.data.repository.ContactUsRepositoryProvider$createFullComplaintGlobal$$inlined$flatMapLatest$1(continuation, this.q, this.r);
        contactUsRepositoryProvider$createFullComplaintGlobal$$inlined$flatMapLatest$1.o = flowCollector;
        contactUsRepositoryProvider$createFullComplaintGlobal$$inlined$flatMapLatest$1.p = obj;
        return contactUsRepositoryProvider$createFullComplaintGlobal$$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.List list = (java.util.List) obj2;
            java.util.ArrayList arrayList = new java.util.ArrayList();
            int size = list.size();
            for (int i2 = 0; i2 < size; i2++) {
                arrayList.add(com.vinfast.companion.serviceskit.data.persistent.model.complaint.GlUploadFile.INSTANCE.b((com.vinfast.companion.serviceskit.data.persistent.model.complaint.GlUploadFile) list.get(i2)));
            }
            this.q.a(arrayList);
            timber.log.Timber.a.a("Request create full: " + com.vinfast.companion.core.extensions.ObjectExtensionKt.t(this.q), new java.lang.Object[0]);
            kotlinx.coroutines.flow.Flow flowQ = this.r.q(this.q);
            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, flowQ, 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;
    }
}
