"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Map = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const React = tslib_1.__importStar(require("react"));
const mapsContext_1 = require("../../gravity-blocks/context/mapsContext/mapsContext.js");
const GoogleMap_1 = tslib_1.__importDefault(require("./GoogleMap.js"));
const YandexMap_1 = tslib_1.__importDefault(require("./YMap/YandexMap.js"));
const Map = (props) => {
    const { type } = React.useContext(mapsContext_1.MapsContext);
    switch (type) {
        case mapsContext_1.MapType.Yandex:
            return (0, jsx_runtime_1.jsx)(YandexMap_1.default, { ...props });
        case mapsContext_1.MapType.Google:
            return (0, jsx_runtime_1.jsx)(GoogleMap_1.default, { ...props });
        default:
            return null;
    }
};
exports.Map = Map;
exports.default = exports.Map;
//# sourceMappingURL=Map.js.map
