"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GeocoderProvider = void 0;
const extension_provider_1 = require("../../integration/extension.provider");
const cached_result_provider_1 = require("../cached-result/cached-result.provider");
const server_config_provider_1 = require("../server-config/server-config.provider");
const geocoder_nominatim_provider_1 = require("./geocoder-nominatim/geocoder-nominatim.provider");
const geocoder_nominatim_service_1 = require("./geocoder-nominatim/geocoder-nominatim.service");
const geocoder_position_stack_provider_1 = require("./geocoder-position-stack/geocoder-position-stack.provider");
const geocoder_position_stack_service_1 = require("./geocoder-position-stack/geocoder-position-stack.service");
const geocoder_const_1 = require("./geocoder.const");
const geocoder_service_1 = require("./geocoder.service");
class GeocoderProvider extends extension_provider_1.ExtensionProvider {
    constructor(app) {
        super(geocoder_const_1.GEOCODER_PROVIDER, app);
        this.app = app;
        this.requiredProviders.push(server_config_provider_1.ServerConfigProvider, cached_result_provider_1.CachedResultProvider, geocoder_position_stack_provider_1.GeocoderPositionStackProvider, geocoder_nominatim_provider_1.GeocoderNominatimProvider);
        this.services.push({ cls: geocoder_service_1.GeocoderService });
    }
    //  await this.app.getService(serviceProvider.cls);}
    async boot() {
        await super.boot();
        const service = await this.app.getService(geocoder_service_1.GeocoderService);
        service.registerService(await this.app.getService(geocoder_position_stack_service_1.GeocoderPositionStackService));
        service.registerService(await this.app.getService(geocoder_nominatim_service_1.GeocoderNominatimService));
    }
}
exports.GeocoderProvider = GeocoderProvider;
//# sourceMappingURL=geocoder.provider.js.map