"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.computeLinks = computeLinks;
const getRelativeWorkspaceUrl_1 = require("../../core/getRelativeWorkspaceUrl");
const internalContentUtils_1 = require("../../content/_internal/internalContentUtils");
const getEventSlug_1 = require("./getEventSlug");
const getEventThumbnail_1 = require("../../utils/getEventThumbnail");
/**
 * Compute the links that get appended to a Hub Event
 * search result and entity
 *
 * @param item
 * @param requestOptions
 */
function computeLinks(event) {
    var _a;
    const siteRelative = (0, internalContentUtils_1.getHubRelativeUrl)("event", (0, getEventSlug_1.getEventSlug)(event));
    return {
        self: siteRelative,
        siteRelative,
        siteRelativeEntityType: (0, internalContentUtils_1.getHubRelativeUrl)("event"),
        workspaceRelative: (0, getRelativeWorkspaceUrl_1.getRelativeWorkspaceUrl)("Event", event.id),
        thumbnail: (_a = event.thumbnailUrl) !== null && _a !== void 0 ? _a : (0, getEventThumbnail_1.getEventThumbnail)(),
    };
}
//# sourceMappingURL=computeLinks.js.map