import { DateTime, Duration, Interval } from "luxon"; export declare const CLOCK_ELEMENT = "sp-clock"; export declare const HOURMIN_ELEMENT = "sp-hourmin"; export declare const DATETIME_ELEMENT = "sp-datetime"; export declare const TIMERANGE_ELEMENT = "sp-timerange"; export declare const hourMinRegEx: RegExp; export declare const HOUR_MIN_24 = "HH:mm"; export declare const START_LABEL = "startlabel"; export declare const DEFAULT_START_LABEL = "Start:"; export declare const END_LABEL = "endlabel"; export declare const DEFAULT_END_LABEL = "End:"; export declare const DUR_LABEL = "durLabel"; export declare const DEFAULT_DUR_LABEL = "Dur:"; export declare const PREV_NEXT = "prev-next"; export declare class Clock extends HTMLElement { _time: DateTime; dateFormat: string; updateMillis: number; _updater: ReturnType; constructor(); updateNow(): void; } /** * Hour and Minute chooser. * Use as '' */ export declare class HourMinChooser extends HTMLElement { _time: DateTime; updateCallback: (time: DateTime) => void; popupDiv: HTMLDivElement; constructor(); /** * Shows or hides the popup based on current visibility style */ showHide(): void; hide(): void; show(): void; /** @private */ xxx_adjustPopupPosition(): void; /** @private */ _adjustPopupPosition(): void; /** * Get hours and minutes as Duration instead of as a DateTime. Useful for * relative times. * * @returns hours, minutes as Duration */ get asDuration(): Duration; get time(): DateTime; set time(dt: DateTime); _internalSetTime(dt: DateTime): void; } /** * Date and Time chooser using native date chooser and the above * HourMinChooser for the hour and minute of time. */ export declare class DateTimeChooser extends HTMLElement { _time: DateTime; updateCallback: (time: DateTime) => void; hourMin: HourMinChooser; constructor(time?: DateTime); /** * Updates the time without triggering the callback function. * * @param newTime new time to update sliders */ updateTime(newTime: DateTime): void; /** * triggers the callback function. */ timeModified(): void; get time(): DateTime; set time(dt: DateTime); /** * internal time set * * @private * @param newTime new time to update */ _internalSetTime(newTime: DateTime): void; attributeChangedCallback(name: string, oldValue: string, newValue: string): void; static get observedAttributes(): string[]; } export declare const START_CHANGED = "start"; export declare const END_CHANGED = "end"; export declare const DURATION_CHANGED = "duration"; /** * Combination of two DateTimeChoosers to specify a start and end time. * A "change" event is fired when the times are modified. * * Initial values can be set via the start, end and duration attributes. * Start and end are ISO8601 dates, duration may either be a number of * seconds or an ISO8601 duration string. * Also, if the prev-next attribute is true, then previous, next and now * buttons are added to shift the time range earlier, later or so that * the end is the current time. * * The component remembers the last changed, so if you modify duration * and then modify start, the end is adjusted to keep duration the same. * */ export declare class TimeRangeChooser extends HTMLElement { updateCallback: (timerange: Interval) => void; _duration: Duration; startChooser: DateTimeChooser; endChooser: DateTimeChooser; _mostRecentChanged: string; constructor(); toInterval(): Interval; getTimeRange(): Interval; /** * Updates the times without triggering the callback function. * * @param timeRange new time interval */ updateTimeRange(timeRange: Interval): void; get startLabel(): string; get endLabel(): string; get durationLabel(): string; get start(): DateTime; set start(time: DateTime | string); get end(): DateTime; set end(time: DateTime); set duration(duration: Duration); get duration(): Duration; _updateDuration(duration: Duration | string): void; resyncValues(curChanged: string): void; createPrevNext(): void; attributeChangedCallback(name: string, oldValue: string, newValue: string): void; static get observedAttributes(): string[]; } /** * extracts duration from either string as ISO or number as seconds. * * @param value ISO string or number * @returns duration */ export declare function extractDuration(value: string): Duration; //# sourceMappingURL=datechooser.d.mts.map