import { getRelativeWorkspaceUrl } from "../../core/getRelativeWorkspaceUrl";
import { getGroupHomeUrl } from "../../urls/getGroupHomeUrl";
import { getGroupThumbnailUrl } from "../../search/utils";
import { getHubRelativeUrl } from "../../content/_internal/internalContentUtils";
/**
 * Compute the links that get appended to a Hub Group
 * search result and entity
 *
 * @param group
 * @param requestOptions
 */
export function computeLinks(group, requestOptions) {
    let token;
    if (requestOptions.authentication) {
        const session = requestOptions.authentication;
        token = session.token;
    }
    return {
        self: getGroupHomeUrl(group.id, requestOptions),
        siteRelative: `/groups/${group.id}`,
        siteRelativeEntityType: getHubRelativeUrl("Group"),
        workspaceRelative: getRelativeWorkspaceUrl("Group", group.id),
        thumbnail: getGroupThumbnailUrl(requestOptions.portal, group, token),
    };
}
//# sourceMappingURL=computeLinks.js.map