package qg;

import com.adobe.marketing.mobile.Extension;
import com.adobe.marketing.mobile.ExtensionApi;
import com.adobe.marketing.mobile.ExtensionHelper;
import com.adobe.marketing.mobile.ExtensionUnexpectedError;
import java.lang.reflect.Constructor;
import java.util.Map;
import kotlin.jvm.internal.t;

/* loaded from: classes4.dex */
public abstract class h {
    public static final String a(Extension extensionFriendlyName) {
        t.g(extensionFriendlyName, "$this$extensionFriendlyName");
        return ExtensionHelper.a(extensionFriendlyName);
    }

    public static final Map b(Extension extensionMetadata) {
        t.g(extensionMetadata, "$this$extensionMetadata");
        return ExtensionHelper.b(extensionMetadata);
    }

    public static final String c(Extension extensionName) {
        t.g(extensionName, "$this$extensionName");
        return ExtensionHelper.c(extensionName);
    }

    public static final String d(Class extensionTypeName) {
        t.g(extensionTypeName, "$this$extensionTypeName");
        return extensionTypeName.getName();
    }

    public static final String e(Extension extensionVersion) {
        t.g(extensionVersion, "$this$extensionVersion");
        return ExtensionHelper.d(extensionVersion);
    }

    public static final Extension f(Class initWith, ExtensionApi extensionApi) {
        t.g(initWith, "$this$initWith");
        t.g(extensionApi, "extensionApi");
        try {
            Constructor extensionConstructor = initWith.getDeclaredConstructor(ExtensionApi.class);
            t.f(extensionConstructor, "extensionConstructor");
            extensionConstructor.setAccessible(true);
            return (Extension) extensionConstructor.newInstance(extensionApi);
        } catch (Exception e10) {
            wg.t.a("MobileCore", "ExtensionExt", "Initializing Extension " + initWith + " failed with " + e10, new Object[0]);
            return null;
        }
    }

    public static final void g(Extension onExtensionRegistered) {
        t.g(onExtensionRegistered, "$this$onExtensionRegistered");
        ExtensionHelper.f(onExtensionRegistered);
    }

    public static final void h(Extension onExtensionUnexpectedError, ExtensionUnexpectedError error) {
        t.g(onExtensionUnexpectedError, "$this$onExtensionUnexpectedError");
        t.g(error, "error");
        ExtensionHelper.e(onExtensionUnexpectedError, error);
    }

    public static final void i(Extension onExtensionUnregistered) {
        t.g(onExtensionUnregistered, "$this$onExtensionUnregistered");
        ExtensionHelper.g(onExtensionUnregistered);
    }
}
