import e from"./relative-time.js";import t from"./relative-time-element.js";import{localeFromElement as m}from"./utils.js";export default class TimeAgoElement extends t{getFormattedDate(){const t=this.getAttribute("format"),i=this.date;if(i)return"micro"===t?new e(i,m(this)).microTimeAgo():new e(i,m(this)).timeAgo()}}window.customElements.get("time-ago")||(window.TimeAgoElement=TimeAgoElement,window.customElements.define("time-ago",TimeAgoElement));