import logger from './objects/logger.js';
export function displayObjectDeprecationMessage({ deprecatedObject, preferredObject, }) {
    logger.warn(getDeprecationMessage(deprecatedObject, preferredObject, 'object'));
}
export function displayMethodDeprecationMessage({ deprecatedMethod, preferredMethod, }) {
    logger.warn(getDeprecationMessage(deprecatedMethod, preferredMethod, 'method'));
}
function getDeprecationMessage(deprecated, preferred, targetType) {
    const firstPart = `The ${targetType} '${deprecated}' is deprecated and will be removed in the next major release.`;
    if (!preferred) {
        return firstPart;
    }
    return `${firstPart} Please use '${preferred}' instead.`;
}
