package h9;

import ca.canadapost.core.data.auth.api.L1AuthApi;
import ca.canadapost.core.data.model.CommonErrorResponseException;
import ca.canadapost.core.data.model.ResultWrapper;
import g9.s;
import g9.w;
import km.t;
import kotlin.jvm.internal.p0;
import kotlin.jvm.internal.v;
import or.u;

/* loaded from: classes.dex */
public final class f {

    /* loaded from: classes.dex */
    static final class a extends v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ t f21402p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(t tVar) {
            super(1);
            this.f21402p = tVar;
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final ResultWrapper.Error invoke(or.t response) {
            kotlin.jvm.internal.t.g(response, "response");
            return ha.g.a(response, this.f21402p, p0.b(CommonErrorResponseException.class));
        }
    }

    public final L1AuthApi a(ha.c httpClientBuilderFactory, w tokenInjectInterceptor, s authenticator, jr.a loggingInterceptor, f9.a fireBaseAppCheckInterceptor, t moshi) {
        kotlin.jvm.internal.t.g(httpClientBuilderFactory, "httpClientBuilderFactory");
        kotlin.jvm.internal.t.g(tokenInjectInterceptor, "tokenInjectInterceptor");
        kotlin.jvm.internal.t.g(authenticator, "authenticator");
        kotlin.jvm.internal.t.g(loggingInterceptor, "loggingInterceptor");
        kotlin.jvm.internal.t.g(fireBaseAppCheckInterceptor, "fireBaseAppCheckInterceptor");
        kotlin.jvm.internal.t.g(moshi, "moshi");
        Object b10 = new u.b().c("https://www.canadapost-postescanada.ca/mgw/").b(qr.a.g(moshi)).g(httpClientBuilderFactory.a().a(fireBaseAppCheckInterceptor).a(tokenInjectInterceptor).c(authenticator).a(loggingInterceptor).d()).a(new ha.f(new a(moshi))).e().b(L1AuthApi.class);
        kotlin.jvm.internal.t.f(b10, "create(...)");
        return (L1AuthApi) b10;
    }
}
