import GirafeHTMLElement from '../../../base/GirafeHTMLElement.js'; import LayerTimeFormatter from '../../../tools/time/layertimeformatter.js'; import ITimeOptions, { TimeMode, TimeResolution } from '../../../tools/time/itimeoptions.js'; export type TimeRangeLimit = 'lower' | 'upper'; export declare const TimeChangeEvent = "timeChange"; /** * The `TimeWidget` class is a custom HTML element used to manage and display a time range or time value * through one or two sliders or date pickers. It supports two modes (`range` or `value`) and returns * date strings formatted according to the specified time resolution and mode. * The initialize method needs to be called first to configure the widget with an object of type ITimeOptions. * * This class must be extended, since it doesn't have a template of its own. */ declare abstract class TimeWidget extends GirafeHTMLElement { protected lowerInputElem: HTMLInputElement; protected upperInputElem: HTMLInputElement; protected timeFormatter: LayerTimeFormatter; protected resolution: TimeResolution; mode: TimeMode; protected minValue: Date; protected maxValue: Date; protected minDefaultValue: string; protected maxDefaultValue: string; private readonly debounceTime; private timeChangeEventDebounced; constructor(name: string); /** * Initializes the widget and sets properties of the input elements. Must be called before using the widget. * * @param {ITimeOptions} timeOptions - Configuration options for the time widget. */ initialize(timeOptions: ITimeOptions): void; render(): void; renderComponent(): void; protected getInputElement(limit?: TimeRangeLimit): HTMLInputElement; /** * Retrieves the value associated with the input element of the specified limit. * * @param {TimeRangeLimit} [limit] - Optional parameter specifying the input Element ('upper' or 'lower') * for which value is to be fetched. * @return {string} The raw value retrieved from the input element. */ getValue(limit?: TimeRangeLimit): string; /** * Get the current time restriction as a formatted query string. * * @return {string | undefined} The formatted time restriction as string or undefined if the time restriction is empty. * */ getTimeRestriction(): string | undefined; /** * Dispatches a custom event to notify the parent about the changed time. * * @param {boolean} unset - Set the time restriction to undefined. */ private createTimeChangeEvent; /** * Dispatches a debounced time change event to prevent frequent server calls. * * @param {boolean} [unset=false] - Indicates whether the time will be set to undefined. */ protected dispatchTimeChangeEvent(unset?: boolean): void; protected connectedCallback(): void; } export default TimeWidget;