import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { ControlValueAccessor, Validator } from '@angular/forms';
import { DatetimeAdapter, DateTimeFormats } from '@fundamental-ngx/core/datetime';
import { SpecialDayRule } from '@fundamental-ngx/core/shared';
import { Nullable } from '@fundamental-ngx/cdk/utils';
import { ContentDensityObserver } from '@fundamental-ngx/core/content-density';
import { CalendarHeaderComponent } from './calendar-header/calendar-header.component';
import { CalendarAggregatedYearViewComponent } from './calendar-views/calendar-aggregated-year-view/calendar-aggregated-year-view.component';
import { CalendarDayViewComponent } from './calendar-views/calendar-day-view/calendar-day-view.component';
import { CalendarMonthViewComponent } from './calendar-views/calendar-month-view/calendar-month-view.component';
import { CalendarYearViewComponent } from './calendar-views/calendar-year-view/calendar-year-view.component';
import { AggregatedYear } from './models/aggregated-year';
import { CalendarCurrent } from './models/calendar-current';
import { CalendarYearGrid } from './models/calendar-year-grid';
import { DisableDateFunction, EscapeFocusFunction } from './models/common';
import { DateRange } from './models/date-range';
import { CalendarType, DaysOfWeek, FdCalendarView, NavigationButtonDisableFunction } from './types';
import * as i0 from "@angular/core";
/**
 * Months: 1 = January, 12 = december.
 * Days: 1 = Sunday, 7 = Saturday
 *
 * Calendar component used for selecting dates, typically used by the DatePicker and DateTimePicker components.
 * Supports the Angular forms module, enabling form validity, ngModel, etc.
 * ```html
 * <fd-calendar></fd-calendar>
 * ```
 *
 */
export declare class CalendarComponent<D> implements OnInit, OnChanges, ControlValueAccessor, Validator, OnDestroy {
    private _elementRef;
    private _changeDetectorRef;
    private _dateTimeAdapter;
    private _dateTimeFormats;
    /** The currently selected date model in single mode. */
    selectedDate: Nullable<D>;
    /** The currently selected date model in multiple mode. */
    selectedMultipleDates: Array<D>;
    /** The currently selected date model with start and end in range mode. */
    selectedRangeDate: DateRange<D>;
    /** The currently selected date model with multiple ranges. */
    selectedMultipleDateRanges: Array<DateRange<D>>;
    /**
     * Whether user wants to mark sunday/saturday with `fd-calendar__item--weekend` class
     */
    markWeekends: boolean;
    /**
     * Whether user wants to show week numbers next to days
     */
    showWeekNumbers: boolean;
    /**
     * Whether the user wants to select multiple days or multiple range dates.
     * If `displayWeekNumbers` is true, the user can click on the week number to mark the related row.
     * The user can click on week days to mark the related column.
     * Note: Clickable selection for week row or column does not work for range selections.
     */
    allowMultipleSelection: boolean;
    /** Whether calendar is used inside mobile in landscape mode, it also adds close button on right side */
    mobileLandscape: boolean;
    /** Whether calendar is used inside mobile in portrait mode */
    mobilePortrait: boolean;
    /** Actually shown active view one of 'day' | 'month' | 'year' */
    activeView: FdCalendarView;
    /** The day of the week the calendar should start on. 1 represents Sunday, 2 is Monday, 3 is Tuesday, and so on. */
    startingDayOfWeek: DaysOfWeek;
    /**
     * The type of calendar
     * 'single' for single date selection
     * 'range' for a range of dates.
     */
    calType: CalendarType;
    /** Id of the calendar. If none is provided, one will be generated. */
    id: string;
    /**
     * Special days mark, it can be used by passing array of object with
     * Special day number, list 1-20 [class:`fd-calendar__item--legend-{{number}}`] is available there:
     * https://sap.github.io/fundamental-styles/components/calendar.html calendar special days section
     * Rule accepts method with D object as a parameter. ex:
     * `rule: (fdDate: D) => fdDate.getDay() === 1`, which will mark all sundays as special day.
     */
    specialDaysRules: SpecialDayRule<D>[];
    /**
     * Object to customize year grid,
     * Row, Columns and method to display year can be modified
     */
    yearGrid: CalendarYearGrid;
    /**
     * Object to customize aggregated year grid,
     * Row, Columns and method to display year can be modified
     */
    aggregatedYearGrid: CalendarYearGrid;
    /**
     * Whether user wants to mark day cells on hover.
     * Works only on range mode, when start date is selected on Day View.
     */
    rangeHoverEffect: boolean;
    /** Whether to pick the date range in month or year or days format
     * Day format will have a month and year including day
     * Month format will have year including month
     * Year format will have just year
     * Values can be 'month' for Month format, 'year' for Year format or nothing for day format
     */
    dateRangeFormat: string;
    /** Event thrown every time active view is changed */
    readonly activeViewChange: EventEmitter<FdCalendarView>;
    /** Event thrown every time selected date in single mode is changed */
    readonly selectedDateChange: EventEmitter<D>;
    /** Event thrown every time the selected dates in multiple mode are changed. */
    readonly selectedMultipleDatesChange: EventEmitter<Array<D>>;
    /** Event thrown every time selected first or last date in range mode is changed */
    readonly selectedRangeDateChange: EventEmitter<DateRange<D>>;
    /** Event thrown every time the first or last date in multiple range mode is changed. */
    readonly selectedMultipleDateRangesChange: EventEmitter<Array<DateRange<D>>>;
    /** Event thrown every time when value is overwritten from outside and throw back isValid */
    readonly isValidDateChange: EventEmitter<boolean>;
    /** Event thrown every time when calendar should be closed */
    readonly closeCalendar: EventEmitter<void>;
    /** Event thrown, when close button is clicked */
    readonly closeClicked: EventEmitter<void>;
    /** @hidden */
    _dayViewComponent: CalendarDayViewComponent<D>;
    /** @hidden */
    _monthViewComponent: CalendarMonthViewComponent<D>;
    /** @hidden */
    _yearViewComponent: CalendarYearViewComponent<D>;
    /** @hidden */
    _aggregatedYearViewComponent: CalendarAggregatedYearViewComponent<D>;
    /** @hidden */
    _calendarHeaderComponent: CalendarHeaderComponent<D>;
    /**
     * Function used to disable previous button in the calendar header.
     * @param date selected date
     * @param currentlyDisplayedDate currently displayed date
     * @param activeView current view of calendar
     */
    previousButtonDisableFunction: NavigationButtonDisableFunction<D>;
    /**
     * Function used to disable next button in the calendar header.
     * @param date selected date
     * @param currentlyDisplayedDate currently displayed date
     * @param activeView current view of calendar
     */
    nextButtonDisableFunction: NavigationButtonDisableFunction<D>;
    /** The unique ID of the calendar legend, if the calendar is to display a legend. */
    associatedLegendId: string;
    /**
     * @hidden
     * Currently displayed days depending on month and year
     */
    _currentlyDisplayed: CalendarCurrent;
    /** @hidden */
    previousButtonDisabled: boolean;
    /** @hidden */
    nextButtonDisabled: boolean;
    /** @hidden */
    private _subscriptions;
    /** @hidden */
    private _adapterStartingDayOfWeek;
    /** @hidden */
    constructor(_elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, _contentDensityObserver: ContentDensityObserver, _dateTimeAdapter: DatetimeAdapter<D>, _dateTimeFormats: DateTimeFormats);
    /** That allows to define function that should happen, when focus should normally escape of component */
    escapeFocusFunction: EscapeFocusFunction;
    /**
     * Function used to disable certain dates in the calendar.
     */
    disableFunction: DisableDateFunction<D>;
    /**
     * Function used to disable certain dates in the calendar for the range start selection.
     */
    disableRangeStartFunction: DisableDateFunction<D>;
    /**
     * Function used to disable certain dates in the calendar for the range end selection.
     */
    disableRangeEndFunction: DisableDateFunction<D>;
    /** @hidden */
    focusOut(event: FocusEvent): void;
    /** @hidden */
    onChange: (_: D | Array<D> | DateRange<D> | Array<DateRange<D>>) => void;
    /** @hidden */
    onTouched: () => void;
    /** @hidden */
    ngOnInit(): void;
    /** @hidden */
    ngOnChanges(changes: SimpleChanges): void;
    /** @hidden */
    getWeekStartDay(): DaysOfWeek;
    /** @hidden */
    ngOnDestroy(): void;
    /**
     * @hidden
     * Function that provides support for ControlValueAccessor that allows to use [(ngModel)] or forms.
     */
    writeValue(selected: D | Array<D> | DateRange<D> | Array<DateRange<D>>): void;
    /**
     * @hidden
     * Function that implements Validator Interface, adds validation support for forms
     */
    validate(): {
        [key: string]: any;
    } | null;
    /** @hidden */
    registerOnChange(fn: any): void;
    /** @hidden */
    registerOnTouched(fn: any): void;
    /**
     * Method that handle active view change and throws event.
     *
     * Fired by calendar header component.
     */
    handleActiveViewChange(activeView: FdCalendarView): void;
    /**
     * @hidden
     * Method that is triggered by events from day view component, when there is selected single date changed
     */
    selectedDateChanged(date: D): void;
    /**
     * @hidden
     * Method that is triggered by events from day view component, when there is selected multi date changed
     */
    selectedMultipleDatesChanged(date: Array<D>): void;
    /**
     * @hidden
     * Method that is triggered by events from day view component, when there is selected range date changed
     */
    selectedRangeDateChanged(dates: DateRange<D>): void;
    /**
     * @hidden
     * Method that is triggered by events from day view component, when there is selected range date changed
     */
    selectedMultipleDateRangesChanged(dates: Array<DateRange<D>>): void;
    /** Function that handles next arrow icon click, depending on current view it changes month, year or list of years */
    handleNextArrowClick(): void;
    /** Function that handles previous arrow icon click, depending on current view it changes month, year or list of years */
    handlePreviousArrowClick(): void;
    /** Function that allows to switch actual view to next month */
    displayNextMonth(): void;
    /** Function that allows to switch actual view to previous month */
    displayPreviousMonth(): void;
    /** Function that allows to switch actual view to next year */
    displayNextYear(): void;
    /** Function that allows to switch actual view to previous year */
    displayPreviousYear(): void;
    /** Function that allows to switch actually displayed list of year to next year list*/
    displayNextYearList(): void;
    /** Function that allows to switch actually displayed list of year to previous year list*/
    displayPreviousYearList(): void;
    /** Function that allows to switch actually displayed list of year to next year list*/
    displayNextYearsList(): void;
    /** Function that allows to switch actually displayed list of year to previous year list*/
    displayPreviousYearsList(): void;
    /**
     * Function that allows to change currently displayed month/year configuration,
     * which are connected to days displayed
     */
    setCurrentlyDisplayed(date: Nullable<D>): void;
    /**
     * Set initial focus on one of the calendar's element
     */
    initialFocus(): void;
    /**
     * @hidden
     * Function that handles changes from month view child component, changes actual view and changes currently displayed month
     */
    handleMonthViewChange(month: number): void;
    /** Select year */
    selectedYear(yearSelected: number): void;
    /** Select year range */
    selectedYears(yearsSelected: AggregatedYear): void;
    /** @hidden */
    onDaysViewSelected(): void;
    /** @hidden */
    onMonthViewSelected(): void;
    /** @hidden */
    onYearViewSelected(): void;
    /** @hidden */
    onYearsRangeViewSelected(): void;
    /** Method that provides information if model selected date/dates have properly types and are valid */
    isModelValid(): boolean;
    /** Whether the date range format is month */
    isDateRangeMonthFormat(): boolean;
    /** Whether the date range format is year */
    isDateRangeYearFormat(): boolean;
    /** @hidden */
    private _listenToLocaleChanges;
    /**
     * @hidden
     * Method that sets up the currently displayed variables, like shown month and year.
     * Day grid is based on currently displayed month and year
     */
    private _prepareDisplayedView;
    /** @hidden */
    private _setCurrentlyDisplayed;
    /** @hidden */
    private _getActiveFocusableView;
    /** @hidden */
    private _setNavigationButtonsStates;
    /** @hidden */
    private _isNavigationButtonDisabled;
    static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent<any>, [null, null, null, { optional: true; }, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent<any>, "fd-calendar", never, { "selectedDate": { "alias": "selectedDate"; "required": false; }; "selectedMultipleDates": { "alias": "selectedMultipleDates"; "required": false; }; "selectedRangeDate": { "alias": "selectedRangeDate"; "required": false; }; "selectedMultipleDateRanges": { "alias": "selectedMultipleDateRanges"; "required": false; }; "markWeekends": { "alias": "markWeekends"; "required": false; }; "showWeekNumbers": { "alias": "showWeekNumbers"; "required": false; }; "allowMultipleSelection": { "alias": "allowMultipleSelection"; "required": false; }; "mobileLandscape": { "alias": "mobileLandscape"; "required": false; }; "mobilePortrait": { "alias": "mobilePortrait"; "required": false; }; "activeView": { "alias": "activeView"; "required": false; }; "startingDayOfWeek": { "alias": "startingDayOfWeek"; "required": false; }; "calType": { "alias": "calType"; "required": false; }; "id": { "alias": "id"; "required": false; }; "specialDaysRules": { "alias": "specialDaysRules"; "required": false; }; "yearGrid": { "alias": "yearGrid"; "required": false; }; "aggregatedYearGrid": { "alias": "aggregatedYearGrid"; "required": false; }; "rangeHoverEffect": { "alias": "rangeHoverEffect"; "required": false; }; "dateRangeFormat": { "alias": "dateRangeFormat"; "required": false; }; "previousButtonDisableFunction": { "alias": "previousButtonDisableFunction"; "required": false; }; "nextButtonDisableFunction": { "alias": "nextButtonDisableFunction"; "required": false; }; "associatedLegendId": { "alias": "associatedLegendId"; "required": false; }; "escapeFocusFunction": { "alias": "escapeFocusFunction"; "required": false; }; "disableFunction": { "alias": "disableFunction"; "required": false; }; "disableRangeStartFunction": { "alias": "disableRangeStartFunction"; "required": false; }; "disableRangeEndFunction": { "alias": "disableRangeEndFunction"; "required": false; }; }, { "activeViewChange": "activeViewChange"; "selectedDateChange": "selectedDateChange"; "selectedMultipleDatesChange": "selectedMultipleDatesChange"; "selectedRangeDateChange": "selectedRangeDateChange"; "selectedMultipleDateRangesChange": "selectedMultipleDateRangesChange"; "isValidDateChange": "isValidDateChange"; "closeCalendar": "closeCalendar"; "closeClicked": "closeClicked"; }, never, never, true, never>;
}
