"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPosition = void 0;
const ip_1 = __importDefault(require("ip"));
const os_1 = __importDefault(require("os"));
const detect_environment_1 = require("./detect-environment");
/**
 * Calculates position for the DACS object
 */
function getPosition() {
    if ((0, detect_environment_1.detectEnvironment)() === "NODEJS" /* NODEJS */) {
        return `${ip_1.default.address()}/${os_1.default.hostname()}`;
    }
    return 'browser';
}
exports.getPosition = getPosition;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXBvc2l0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3V0aWwvZ2V0LXBvc2l0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLDRDQUFvQjtBQUNwQiw0Q0FBb0I7QUFDcEIsNkRBQXNFO0FBRXRFOztHQUVHO0FBQ0gsU0FBZ0IsV0FBVztJQUN2QixJQUFJLElBQUEsc0NBQWlCLEdBQUUsMEJBQXVCLEVBQUU7UUFDNUMsT0FBTyxHQUFHLFlBQUUsQ0FBQyxPQUFPLEVBQUUsSUFBSSxZQUFFLENBQUMsUUFBUSxFQUFFLEVBQUUsQ0FBQztLQUM3QztJQUVELE9BQU8sU0FBUyxDQUFDO0FBQ3JCLENBQUM7QUFORCxrQ0FNQyJ9