(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
    typeof define === 'function' && define.amd ? define('@iotize/device-client.js/api', factory) :
    (global = global || self, (global.iotize = global.iotize || {}, global.iotize['device-client'] = global.iotize['device-client'] || {}, global.iotize['device-client'].js = global.iotize['device-client'].js || {}, global.iotize['device-client'].js.api = factory()));
}(this, (function () { 'use strict';

    var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

    function commonjsRequire () {
    	throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
    }

    function unwrapExports (x) {
    	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
    }

    function createCommonjsModule(fn, module) {
    	return module = { exports: {} }, fn(module, module.exports), module.exports;
    }

    function getCjsExportFromNamespace (n) {
    	return n && n['default'] || n;
    }

    var apiExplorer = createCommonjsModule(function (module, exports) {
    "use strict";
    var __read = (commonjsGlobal && commonjsGlobal.__read) || function (o, n) {
        var m = typeof Symbol === "function" && o[Symbol.iterator];
        if (!m) return o;
        var i = m.call(o), r, ar = [], e;
        try {
            while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
        }
        catch (error) { e = { error: error }; }
        finally {
            try {
                if (r && !r.done && (m = i["return"])) m.call(i);
            }
            finally { if (e) throw e.error; }
        }
        return ar;
    };
    var __spread = (commonjsGlobal && commonjsGlobal.__spread) || function () {
        for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
        return ar;
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    var ApiExplorer = /** @class */ (function () {
        function ApiExplorer(tap) {
            this.tap = tap;
            this._resources = [];
        }
        Object.defineProperty(ApiExplorer.prototype, "resources", {
            get: function () {
                return this.tap.service
                    .list()
                    .reduce(function (prev, service) {
                    prev.push.apply(prev, __spread(Object.values(service.resources)));
                    return prev;
                }, []);
            },
            enumerable: true,
            configurable: true
        });
        return ApiExplorer;
    }());
    exports.ApiExplorer = ApiExplorer;

    });

    var apiExplorer$1 = unwrapExports(apiExplorer);
    var apiExplorer_1 = apiExplorer.ApiExplorer;

    var public_api = createCommonjsModule(function (module, exports) {
    "use strict";
    function __export(m) {
        for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
    }
    Object.defineProperty(exports, "__esModule", { value: true });
    __export(apiExplorer);

    });

    var public_api$1 = unwrapExports(public_api);

    var iotizeDeviceClient_jsApi = createCommonjsModule(function (module, exports) {
    "use strict";
    /**
     * Generated bundle index. Do not edit.
     */
    function __export(m) {
        for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
    }
    Object.defineProperty(exports, "__esModule", { value: true });
    __export(public_api);

    });

    var iotizeDeviceClient_jsApi$1 = unwrapExports(iotizeDeviceClient_jsApi);

    return iotizeDeviceClient_jsApi$1;

})));
//# sourceMappingURL=iotize-device-client.js-api.umd.js.map
