import { LitElement, PropertyValues, TemplateResult } from "lit";
import { CalendarEvent } from "@openremote/model";
import { InputType } from "@openremote/or-mwc-components/or-mwc-input";
import { OrMwcDialog } from "@openremote/or-mwc-components/or-mwc-dialog";
import { RRule } from "rrule";
import { EventTypes, rruleEnds } from "./util";
import type { RulePartKey, RuleParts, LabeledEventTypes, Frequency } from "./types";
export { RuleParts, RulePartKey, Frequency, LabeledEventTypes };
export * from "./util";
export interface OrSchedulerChangedEventDetail {
    value?: CalendarEvent;
}
export declare class OrSchedulerChangedEvent extends CustomEvent<OrSchedulerChangedEventDetail> {
    static readonly NAME = "or-scheduler-changed";
    constructor(value?: CalendarEvent);
}
declare global {
    export interface HTMLElementEventMap {
        [OrSchedulerChangedEvent.NAME]: OrSchedulerChangedEvent;
    }
}
declare const OrScheduler_base: (new (...args: any[]) => {
    _i18nextJustInitialized: boolean;
    _language: string;
    connectedCallback(): void;
    disconnectedCallback(): void;
    shouldUpdate(changedProps: PropertyValues): any;
    initCallback: (options: import("i18next").InitOptions) => void;
    langChangedCallback: () => void;
    readonly isConnected: boolean;
}) & typeof LitElement;
export declare class OrScheduler extends OrScheduler_base {
    defaultSchedule?: CalendarEvent;
    defaultEventTypeLabel: string;
    disabledFrequencies: Frequency[];
    disabledRRuleParts: RulePartKey[];
    header: string;
    isAllDay: boolean;
    schedule?: CalendarEvent;
    timezoneOffset: number;
    protected _ends: keyof typeof rruleEnds;
    protected _normalizedSchedule: CalendarEvent | undefined;
    protected _rrule?: RRule;
    protected dialog?: OrMwcDialog;
    protected _byRRuleParts?: RulePartKey[];
    protected _count: number;
    protected _dialog?: OrMwcDialog;
    protected _eventType: EventTypes;
    protected _eventTypes: LabeledEventTypes;
    protected _until: Date;
    protected firstUpdated(_changedProps: PropertyValues): void;
    protected willUpdate(changedProps: PropertyValues): void;
    protected updated(changedProps: PropertyValues): void;
    /**
     * Converts the recurrence rule to string and normalizes it.
     *
     * The UTC timezone offset 'Z' for the UNTIL rule part is removed,
     * because the backend uses a `LocalDateTime` object to compare.
     * @param rrule The recurrence rule to normalize.
     * @returns String representation of the defined Recurrence Rule
     */
    protected getRRule(rrule?: RRule | undefined): string | undefined;
    protected setRRuleValue(value: any, key: keyof RuleParts | "start" | "end" | "start-time" | "end-time" | "all-day" | "recurrence-ends"): void;
    protected timeLabel(): string | undefined;
    protected setCalendarEventType(value: any): void;
    /**
     * Apply the timezone offset to the calendarEvent
     * @param schedule The schedule for which to add/substract the offset
     * @param substract Whether to substract the offset
     * @returns The transformed calendar event
     */
    protected applyTimezoneOffset(schedule?: CalendarEvent, substract?: boolean): CalendarEvent | undefined;
    protected render(): TemplateResult<1>;
    protected showDialog(): void;
    protected getDialogContent(): TemplateResult;
    /**
     * Check if this frequency is allowed
     * @param freq The frequency to check
     * @returns Whether the frequency is allowed
     */
    protected isAllowedFrequency(freq: Frequency): boolean;
    /**
     * Displays the interval, frequency and BY_XXX RRule part fields
     *
     * Applicable rule parts
     * - `interval`
     * - `freq`
     * - `bysecond`
     * - `byminute`
     * - `byhour`
     * - `byweekday`
     * - `bymonthday`
     * - `byyearday`
     * - `byweekno`
     * - `bymonth`
     *
     * Evaluation order: BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR, BYMINUTE and BYSECOND.
     *
     * @returns Inputs for the applicable rule parts
     */
    protected getRepeatTemplate(): TemplateResult;
    /**
     * Displays the BY_XXX RRule part fields if allowed by the frequency
     *
     * @returns The specified BY_XXX RRule part field or undefined if not applicable
     */
    protected getByRulePart<T>(part: RulePartKey, type: InputType, options: T[]): TemplateResult | undefined;
    /**
     * Displays the fields that define when and how long the particular event is
     *
     * @param calendar The specified calendar event
     * @returns The periods allDay and from/to date and time fields
     */
    protected getPeriodTemplate(calendar: CalendarEvent): TemplateResult;
    /**
     * Displays the fields that define how a recurring event should end
     *
     * Applicable rule parts
     * - `until`
     * - `count`
     * @returns The recurrence ends fields
     */
    protected getEndsTemplate(): TemplateResult;
}
//# sourceMappingURL=index.d.ts.map