import { FormatBase } from "../format/format.base.js"; import { RelativeTimeFormatOptions } from "@odx/foundation"; import { PropertyValues, TemplateResult } from "lit"; declare global { interface HTMLElementTagNameMap { 'odx-relative-time': OdxRelativeTime; } } /** * @summary A component for formatting date values as relative time strings using the Intl.RelativeTimeFormat API. * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat | `Intl.RelativeTimeFormat`} */ declare class OdxRelativeTime extends FormatBase { #private; static tagName: string; /** * The {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#style | style} of the formatted relative time. */ format?: RelativeTimeFormatOptions['style'] | null; /** * The minimum unit to use when formatting the relative time. */ minUnit?: RelativeTimeFormatOptions['minUnit'] | null; /** * Whether to use {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#numeric | numeric} values in the output. */ numeric?: RelativeTimeFormatOptions['numeric'] | null; /** * The start date to use as the reference point when calculating the relative time. Defaults to the current date and time. * * Can be a `Date` object, a timestamp (number), or a date string. */ start?: number | string | Date | null; /** * An optional interval in milliseconds to automatically update the displayed relative time string. * * The minimal allowed value is `100` milliseconds to prevent excessive updates. * If set to `null`, the relative time string will not update automatically. */ syncInterval?: number | null; /** * The date value to format as relative time. * * Can be a `Date` object, a timestamp (number), or a date string. */ value: number | string | Date; /** * The date value as a `Date` object, or `null` if the value is invalid or not set. */ get valueAsDate(): Date | null; disconnectedCallback(): void; willUpdate(props: PropertyValues): void; protected transform(value: Date | string): TemplateResult; } export { OdxRelativeTime };