"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.computeLinks = computeLinks;
const getRelativeWorkspaceUrl_1 = require("../../core/getRelativeWorkspaceUrl");
const getGroupHomeUrl_1 = require("../../urls/getGroupHomeUrl");
const utils_1 = require("../../search/utils");
const internalContentUtils_1 = require("../../content/_internal/internalContentUtils");
/**
 * Compute the links that get appended to a Hub Group
 * search result and entity
 *
 * @param group
 * @param requestOptions
 */
function computeLinks(group, requestOptions) {
    let token;
    if (requestOptions.authentication) {
        const session = requestOptions.authentication;
        token = session.token;
    }
    return {
        self: (0, getGroupHomeUrl_1.getGroupHomeUrl)(group.id, requestOptions),
        siteRelative: `/groups/${group.id}`,
        siteRelativeEntityType: (0, internalContentUtils_1.getHubRelativeUrl)("Group"),
        workspaceRelative: (0, getRelativeWorkspaceUrl_1.getRelativeWorkspaceUrl)("Group", group.id),
        thumbnail: (0, utils_1.getGroupThumbnailUrl)(requestOptions.portal, group, token),
    };
}
//# sourceMappingURL=computeLinks.js.map