/*
 * Application Insights JavaScript SDK - Web, 3.3.5-nightly3.2411-04
 * Copyright (c) Microsoft and contributors. All rights reserved.
 */
import { throwUnsupported } from "@nevware21/ts-utils";
import { AppInsightsSku } from "./AISku";
import { _DYN_UPDATE_SNIPPET_DEFIN3 } from "./__DynamicConstants";
var ApplicationInsightsContainer = /** @class */ (function () {
    function ApplicationInsightsContainer() {
    }
    ApplicationInsightsContainer.getAppInsights = function (snippet, version) {
        var theSku = new AppInsightsSku(snippet);
        // Two target scenarios:
        // Removed: 1. Customer runs v1 snippet + runtime. If customer updates just cdn location to new SDK, it will run in compat mode so old apis work
        // 2. Customer updates to new snippet (that uses cdn location to new SDK. This is same as a new customer onboarding
        // and all api signatures are expected to map to new SDK. Note new snippet specifies version
        if (version >= 2.0) {
            theSku[_DYN_UPDATE_SNIPPET_DEFIN3 /* @min:%2eupdateSnippetDefinitions */](snippet);
            theSku.loadAppInsights(false);
            return theSku; // default behavior with new snippet
        }
        throwUnsupported("V1 API compatibility is no longer supported");
    };
    return ApplicationInsightsContainer;
}());
export { ApplicationInsightsContainer };
//# sourceMappingURL=ApplicationInsightsContainer.js.map