import { getTagValue } from "./event-tags.js";
/** Returns an articles title, if it exists */
export function getArticleTitle(article) {
    return getTagValue(article, "title");
}
/** Returns an articles image, if it exists */
export function getArticleImage(article) {
    return getTagValue(article, "image");
}
/** Returns an articles summary, if it exists */
export function getArticleSummary(article) {
    return getTagValue(article, "summary");
}
/** Returns an articles published date, if it exists */
export function getArticlePublished(article) {
    const ts = getTagValue(article, "published_at");
    if (ts && !Number.isNaN(parseInt(ts)))
        return parseInt(ts);
    else
        return article.created_at;
}
