package com.google.firebase;

import android.content.Context;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.google.firebase.components.Component;
import com.google.firebase.components.ComponentContainer;
import com.google.firebase.components.ComponentFactory;
import com.google.firebase.components.Dependency;
import com.google.firebase.components.Qualified;
import java.lang.annotation.Annotation;
import java.util.concurrent.Executor;
import kotlin.Metadata;
import kotlin.jvm.internal.t;
import tp.i0;
import tp.m1;

@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u001b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\u001a\u0012\u0010\u0004\u001a\u00020\u0003*\u00020\u00002\u0006\u0010\u0002\u001a\u00020\u0001\u001a\u0014\u0010\u0007\u001a\u0004\u0018\u00010\u0003*\u00020\u00002\u0006\u0010\u0006\u001a\u00020\u0005\u001a\u001a\u0010\u0007\u001a\u00020\u0003*\u00020\u00002\u0006\u0010\u0006\u001a\u00020\u00052\u0006\u0010\t\u001a\u00020\b\u001a\"\u0010\u0007\u001a\u00020\u0003*\u00020\u00002\u0006\u0010\u0006\u001a\u00020\u00052\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u0002\u001a\u00020\u0001\u001a\u001b\u0010\u000e\u001a\b\u0012\u0004\u0012\u00020\r0\f\"\n\b\u0000\u0010\u000b\u0018\u0001*\u00020\nH\u0082\b\"\u0015\u0010\u0004\u001a\u00020\u0003*\u00020\u00008F¢\u0006\u0006\u001a\u0004\b\u000f\u0010\u0010\"\u0015\u0010\t\u001a\u00020\b*\u00020\u00008F¢\u0006\u0006\u001a\u0004\b\u0011\u0010\u0012¨\u0006\u0013"}, d2 = {"Lcom/google/firebase/Firebase;", "", AppMeasurementSdk.ConditionalUserProperty.NAME, "Lcom/google/firebase/FirebaseApp;", "app", "Landroid/content/Context;", "context", "initialize", "Lcom/google/firebase/FirebaseOptions;", "options", "", "T", "Lcom/google/firebase/components/Component;", "Ltp/i0;", "coroutineDispatcher", "getApp", "(Lcom/google/firebase/Firebase;)Lcom/google/firebase/FirebaseApp;", "getOptions", "(Lcom/google/firebase/Firebase;)Lcom/google/firebase/FirebaseOptions;", "com.google.firebase-firebase-common"}, k = 2, mv = {1, 8, 0})
/* loaded from: classes3.dex */
public final class FirebaseKt {
    public static final FirebaseApp app(Firebase firebase, String name) {
        t.g(firebase, "<this>");
        t.g(name, "name");
        FirebaseApp firebaseApp = FirebaseApp.getInstance(name);
        t.f(firebaseApp, "getInstance(name)");
        return firebaseApp;
    }

    private static final /* synthetic */ <T extends Annotation> Component<i0> coroutineDispatcher() {
        t.m(4, "T");
        Component.Builder builder = Component.builder(Qualified.qualified(Annotation.class, i0.class));
        t.m(4, "T");
        Component.Builder add = builder.add(Dependency.required((Qualified<?>) Qualified.qualified(Annotation.class, Executor.class)));
        t.l();
        Component<i0> build = add.factory(new ComponentFactory() { // from class: com.google.firebase.FirebaseKt$coroutineDispatcher$1
            @Override // com.google.firebase.components.ComponentFactory
            public final i0 create(ComponentContainer componentContainer) {
                t.m(4, "T");
                Object obj = componentContainer.get(Qualified.qualified(Annotation.class, Executor.class));
                t.f(obj, "c.get(Qualified.qualifie…a, Executor::class.java))");
                return m1.a((Executor) obj);
            }
        }).build();
        t.f(build, "builder(Qualified.qualif…cher()\n    }\n    .build()");
        return build;
    }

    public static final FirebaseApp getApp(Firebase firebase) {
        t.g(firebase, "<this>");
        FirebaseApp firebaseApp = FirebaseApp.getInstance();
        t.f(firebaseApp, "getInstance()");
        return firebaseApp;
    }

    public static final FirebaseOptions getOptions(Firebase firebase) {
        t.g(firebase, "<this>");
        FirebaseOptions options = getApp(Firebase.INSTANCE).getOptions();
        t.f(options, "Firebase.app.options");
        return options;
    }

    public static final FirebaseApp initialize(Firebase firebase, Context context) {
        t.g(firebase, "<this>");
        t.g(context, "context");
        return FirebaseApp.initializeApp(context);
    }

    public static final FirebaseApp initialize(Firebase firebase, Context context, FirebaseOptions options) {
        t.g(firebase, "<this>");
        t.g(context, "context");
        t.g(options, "options");
        FirebaseApp initializeApp = FirebaseApp.initializeApp(context, options);
        t.f(initializeApp, "initializeApp(context, options)");
        return initializeApp;
    }

    public static final FirebaseApp initialize(Firebase firebase, Context context, FirebaseOptions options, String name) {
        t.g(firebase, "<this>");
        t.g(context, "context");
        t.g(options, "options");
        t.g(name, "name");
        FirebaseApp initializeApp = FirebaseApp.initializeApp(context, options, name);
        t.f(initializeApp, "initializeApp(context, options, name)");
        return initializeApp;
    }
}
