"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Provider = void 0;
var Provider = (function () {
    function Provider() {
    }
    Provider.service = function (name, cb) {
        var _this = this;
        Object.defineProperty(this, name, {
            get: function () {
                if (!Provider.services.hasOwnProperty(name)) {
                    Provider.services[name] = cb(_this);
                }
                return Provider.services[name];
            },
            configurable: true,
            enumerable: true
        });
        return this;
    };
    Provider.get = function (name) {
        return Provider[name];
    };
    Provider.services = {};
    Provider.names = {
        REST_WEB_SERVICE: 'RestWebservice',
        REALTIME_WEB_SERVICE: 'RealtimeWebservice',
        STORAGE_WEB_SERVICE: 'StorageWebservice'
    };
    return Provider;
}());
exports.Provider = Provider;
