"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
var useAzureMapLayer_1 = require("../hooks/useAzureMapLayer");
var AzureMapLayerContext = react_1.createContext({
    layerRef: null
});
exports.AzureMapLayerContext = AzureMapLayerContext;
var Provider = AzureMapLayerContext.Provider, AzureMapLayerConsumer = AzureMapLayerContext.Consumer;
exports.AzureMapLayerConsumer = AzureMapLayerConsumer;
var AzureMapLayerStatefulProvider = function (_a) {
    var id = _a.id, options = _a.options, type = _a.type, events = _a.events, lifecycleEvents = _a.lifecycleEvents;
    var layerRef = useAzureMapLayer_1.useAzureMapLayer({ id: id, options: options, type: type, events: events, lifecycleEvents: lifecycleEvents }).layerRef;
    return (react_1.default.createElement(Provider, { value: {
            layerRef: layerRef
        } }));
};
exports.AzureMapLayerProvider = AzureMapLayerStatefulProvider;
//# sourceMappingURL=AzureMapLayerContext.js.map