"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEventSlug = getEventSlug;
const slugify_1 = require("../../utils/slugify");
/**
 * Builds a slug for the given IEvent record.
 * @param event An IEvent record
 * @returns the slug for the given IEvent record
 */
function getEventSlug(event) {
    return ([(0, slugify_1.slugify)(event.title), event.id]
        .join("-")
        // remove double hyphens
        .split("-")
        .filter(Boolean)
        .join("-"));
}
//# sourceMappingURL=getEventSlug.js.map