"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ig_utilities_1 = require("@intelligentgraphics/ig.utilities");
exports.createAbsoluteUrl = function (url, basePath, hashes) {
    if (ig_utilities_1.isNullOrUndefined(url)) {
        return url;
    }
    var hash = !ig_utilities_1.isNullOrUndefined(hashes) &&
        (typeof hashes === "object" ? hashes[url] : hashes);
    var absoluteUrl = ig_utilities_1.isNullOrUndefined(basePath) || ig_utilities_1.Http.isAbsoluteUrl(url)
        ? url
        : ig_utilities_1.Http.joinPaths(basePath, url);
    if (hash) {
        return ig_utilities_1.Http.createUrl(absoluteUrl, {
            params: {
                igxcHash: hash,
            },
        });
    }
    return absoluteUrl;
};
