import { Component } from '../component'; import { CalendarDateOrTime, CalendarDateTime } from '../date'; import { CalendarDuration } from '../duration'; export declare const DEFAULT_EVENT_DURATION_DATE_TIME: CalendarDuration; export declare const DEFAULT_EVENT_DURATION_DATE: CalendarDuration; /** * Get the default event duration for an event without an end nor duration. * @param isFullDay Whether the event is a full day event. * @returns `DEFAULT_EVENT_DURATION_DATE` for full day events, `DEFAULT_EVENT_DURATION_DATE_TIME` for other events. */ export declare function getDefaultEventDuration(isFullDay: boolean): CalendarDuration; /** * Represents a VEVENT component, representing an event in a calendar. */ export declare class CalendarEvent extends Component { name: string; constructor(uid: string, dtstamp: CalendarDateTime | Date, dtstart: CalendarDateOrTime | Date); constructor(component: Component); serialize(): string; validate(): void; getStamp(): CalendarDateTime; setStamp(value: CalendarDateTime | Date): this; getUid(): string; setUid(value: string): this; getSummary(): string | undefined; setSummary(value: string): this; removeSummary(): void; getDescription(): string | undefined; setDescription(value: string): this; removeDescription(): void; getLocation(): string | undefined; setLocation(value: string): this; removeLocation(): void; /** * Get the start date or time of the event. * @returns The start date or time of the event as a {@link CalendarDateOrTime}. */ getStart(): CalendarDateOrTime; /** * Set the start date or time of the event. * @param value The start date of the event as a {@link CalendarDateOrTime} or `Date`. * @returns The CalendarEvent instance for chaining. */ setStart(value: CalendarDateOrTime | Date): this; /** * Check if this event is a full day event. * @returns `true` if the event is a full day event, `false` if not. */ isFullDay(): boolean; /** * Get the non-inclusive end of the event, implies value from duration if unset. * @returns The end date of the event as a {@link CalendarDateOrTime} or `undefined` if not set. */ getEnd(): CalendarDateOrTime; /** * Get the DTEND property of the event, representing the non-inclusive end of the event. * @returns The end date of the event as a {@link CalendarDateOrTime} or `undefined` if not set. */ getExplicitEnd(): CalendarDateOrTime | undefined; /** * Set the exclusive end of the event. * * Will remove 'duration' if present. * @param value The end date of the event as a {@link CalendarDateOrTime} or `Date`. * @returns The CalendarEvent instance for chaining. * @throws If the end date is a full day date and the start date is a date-time, or vice versa. */ setEnd(value: CalendarDateOrTime | Date): this; /** * Remove the end of the event. * * NOTE: An event must have either an end or a duration set. */ removeEnd(): void; /** * Get the duration of the event, implies value from end or default if unset. * @returns The duration of the event as a {@link CalendarDuration}. */ getDuration(): CalendarDuration; /** * Get the DURATION property of the event. * @returns The duration of the event as a {@link CalendarDuration}, or `undefined` if not set. */ getExplicitDuration(): CalendarDuration | undefined; /** * Set the duration of the event. * * Will remove 'DTEND' if present. * * If DTSTART is of type DATE the duration will be floored to the nearest day. * @param value The duration of the event as a {@link CalendarDuration} duration string. * @returns The CalendarEvent instance for chaining. * @example * // Set duration to 1 hour and 30 minutes. * event.setDuration(`PT1H30M`) */ setDuration(value: string | CalendarDuration): this; /** * Remove the duration of the event. * * NOTE: An event must have either an end or a duration set. */ removeDuration(): void; getCreated(): CalendarDateOrTime | undefined; setCreated(value: Date): this; removeCreated(): void; getGeographicPosition(): [number, number] | undefined; setGeographicPosition(latitude: number, longitude: number): this; removeGeographicLocation(): void; } //# sourceMappingURL=CalendarEvent.d.ts.map