"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var StoreEntity_1 = require("../Core/StoreEntity");
var Geocoding_1 = __importDefault(require("./Entity/Geocoding"));
var Geocoding_consts_1 = require("./Geocoding.consts");
var GeocodingApi = /** @class */ (function () {
    function GeocodingApi(session) {
        this.geocodingEntity = new Geocoding_1.default(session);
        this.realTime = new StoreEntity_1.RealTimeHandler(session.persistentConnection);
    }
    GeocodingApi.prototype.autoComplete = function (address) {
        return this.geocodingEntity.autoComplete(address);
    };
    GeocodingApi.prototype.getPlaceDetails = function (placeId) {
        return this.geocodingEntity.getPlaceDetails(placeId);
    };
    GeocodingApi.prototype.reverseGeocode = function (lat, lng) {
        return this.geocodingEntity.reverseGeocode(lat, lng);
    };
    GeocodingApi.prototype.subscribeToEvent = function (eventHandle) {
        this.realTime.on(Geocoding_consts_1.RealTimeGeocodingEvents.GEOCODING_CHANGED, eventHandle);
    };
    GeocodingApi.prototype.unsubscribeToEvent = function (eventHandle) {
        this.realTime.off(Geocoding_consts_1.RealTimeGeocodingEvents.GEOCODING_CHANGED, eventHandle);
    };
    return GeocodingApi;
}());
exports.default = GeocodingApi;
//# sourceMappingURL=GeocodingApi.js.map