/**
 * Get the user-editable portion of an entity's slug
 * @param entity
 * @returns
 */
export const getEditorSlug = (entity) => {
    const slug = (entity.slug || "").toLowerCase();
    const orgUrlKey = (entity.orgUrlKey || "").toLowerCase();
    if (orgUrlKey) {
        return slug.replace(new RegExp(`${orgUrlKey}\\|`, "gi"), "");
    }
    else {
        return slug;
    }
};
//# sourceMappingURL=getEditorSlug.js.map