import { Http, isNullOrUndefined } from "@intelligentgraphics/ig.utilities";
export var createAbsoluteUrl = function (url, basePath, hashes) {
    if (isNullOrUndefined(url)) {
        return url;
    }
    var hash = !isNullOrUndefined(hashes) &&
        (typeof hashes === "object" ? hashes[url] : hashes);
    var absoluteUrl = isNullOrUndefined(basePath) || Http.isAbsoluteUrl(url)
        ? url
        : Http.joinPaths(basePath, url);
    if (hash) {
        return Http.createUrl(absoluteUrl, {
            params: {
                igxcHash: hash,
            },
        });
    }
    return absoluteUrl;
};
