"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatEventLocationGeolocation = exports.formatCroppedName = void 0;
const formatCroppedName = (name, maxLength) => {
    if (name.length <= maxLength) {
        return name;
    }
    return name.substring(0, maxLength) + '...';
};
exports.formatCroppedName = formatCroppedName;
const formatEventLocationGeolocation = (geolocation, isTitle) => {
    if (!geolocation) {
        return null;
    }
    const parts = geolocation.split(',');
    if (isTitle) {
        return parts[0].trim();
    }
    return parts.slice(1).join(',').trim();
};
exports.formatEventLocationGeolocation = formatEventLocationGeolocation;
