import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { DateTimeFormats, DatetimeAdapter } from '@fundamental-ngx/core/datetime';
import { CalendarService } from '../../calendar.service';
import { CalendarYear, CalendarYearGrid } from '../../models/calendar-year-grid';
import { EscapeFocusFunction, FocusableCalendarView } from '../../models/common';
import { DateRange } from '../../models/date-range';
import * as i0 from "@angular/core";
/** Component representing the YearView of the Calendar Component. */
export declare class CalendarYearViewComponent<D> implements OnInit, OnChanges, FocusableCalendarView {
    private _eRef;
    private _changeDetectorRef;
    private _calendarService;
    private _dateTimeAdapter;
    private _dateTimeFormats;
    /** The id of the calendar passed from the parent component */
    id: string;
    /** Function that is called when the focus would escape the element. */
    focusEscapeFunction: EscapeFocusFunction;
    /** Parameter holding the year that is currently selected. */
    yearSelected: number;
    /**
     * Object to customize year grid
     */
    yearViewGrid: CalendarYearGrid;
    /** Whether the date range is year format only excluding month and day */
    isDateRangeYearFormat: boolean;
    /**
     * Whether user wants to mark year cells on hover.
     * Works only on range mode, when start year is selected.
     */
    rangeHoverEffect: boolean;
    /** Event fired when a year is selected. */
    readonly yearClicked: EventEmitter<number>;
    /** Event thrown every time selected first or last date in range mode is changed */
    readonly selectedRangeDateChange: EventEmitter<DateRange<D>>;
    /**
     * @hidden
     * This variable is used to define which year from calendarYearList should be focusable by tab key
     */
    _activeYear: number;
    /**
     * @hidden
     * Parameter that stores the dozen of years that are currently being displayed.
     */
    _calendarYearListGrid: CalendarYear<D>[][];
    /**
     * @hidden
     * Parameter storing the year of the present day.
     */
    _currentYear: number;
    /**
     * @hidden
     * Parameter storing first shown year on list
     */
    _firstYearInList: number;
    /** View ID */
    get viewId(): string;
    /**
     * @hidden
     * Today cell label ID
     */
    get _todayLabelId(): string;
    /**
     * @hidden
     * Selected date label ID
     */
    get _selectedDateLabelId(): string;
    /**
     * @hidden
     */
    private readonly _destroyRef;
    /** @hidden */
    private _initiated;
    /** @hidden */
    private _selectedRangeDate;
    /** @hidden */
    private _isOnRangePick;
    /** @hidden */
    constructor(_eRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, _calendarService: CalendarService, _dateTimeAdapter: DatetimeAdapter<D>, _dateTimeFormats: DateTimeFormats);
    /** @hidden */
    ngOnInit(): void;
    /** @hidden */
    ngOnChanges(changes: SimpleChanges): void;
    /** The currently selected FdDates model start and end in range mode. */
    set selectedRangeDate(dateRange: DateRange<D>);
    get selectedRangeDate(): DateRange<D>;
    /**
     * @hidden
     *  Amount of selected years
     *  0, when there is no year selected, or start year is invalid,
     *  1, when there is only valid start year, or end year is same as start year,
     *  2, when both dates are valid
     */
    get _selectCounter(): number;
    /** Method used to load the previous {{col * row}} years to be displayed. */
    loadNextYearList(): void;
    /** Method used to load the next {{col * row}} years to be displayed. */
    loadPreviousYearList(): void;
    /** Method that sends the year to the parent component when it is clicked. */
    selectYear(selectedYear: CalendarYear<D>, event?: MouseEvent | KeyboardEvent): void;
    /**
     * Set focus on month cell.
     * It can be a selected cell, current month cell or first cell in the list
     */
    setFocusOnCell(): void;
    /**
     * @hidden
     * Method for handling the keyboard navigation.
     */
    _onKeydownYearHandler(event: KeyboardEvent, index: number): void;
    /**
     * @hidden
     * Method that allows to focus elements inside this component
     */
    _focusElementBySelector(elementSelector: string): void;
    /**
     * @hidden
     * Standardized method to calculate grid [x][y] to index number of flatten list
     */
    _getIndex(rowIndex: number, colIndex: number): number;
    /**
     * @hidden
     * Get grid cell id be index
     * @param index
     */
    _getId(index: number): string;
    /**
     * @hidden
     * Handles hover effect for range selection mode.
     * @param year The calendar year that is hovered.
     */
    _handleRangeHover(year: CalendarYear<D>): void;
    /**
     * @hidden
     * Method that returns active cell, which means:
     * if there is any selected year, return selected year
     * if there is no selected year, but there is current year, return current year
     * if there is no current year, or selected, return first one
     */
    private _getActiveYear;
    /** @hidden */
    private _constructYearGrid;
    /**
     * @hidden
     * Handles the hover effect for range selection.
     * Toggles the hover effect based on the selection state and event.
     * @param event Optional mouse event for handling hover effect.
     */
    private _handleRangeHoverEffect;
    /**
     * @hidden
     * Change properties of range years, this method is called, to not rebuild whole grid from scratch,
     * it just changes properties of newly selected/unselected years.
     */
    private _changeSelectedRangeYears;
    /**
     * @hidden
     * Check if dates are equal
     */
    private _isSameDate;
    /**
     * @hidden
     * Selects or updates the range of years in range mode.
     * Handles the start and end years and updates the selected range.
     * @param year The calendar year to be selected or updated in the range.
     */
    private _selectRangeDate;
    /**
     * @hidden
     * Orders the start and end dates for the range selection.
     * Ensures the start date is before or equal to the end date.
     * @param date1 The first date.
     * @param date2 The second date.
     * @returns An object containing the ordered start and end dates.
     */
    private _getOrderedRange;
    /**
     * @hidden
     * Returns year name as a string.
     */
    private _getYearName;
    /**
     * @hidden
     * Returns aria year name as a string.
     */
    private _getAriaYearName;
    /**
     * @hidden
     * Returns year name taking into account yearMapping.
     */
    private _getYearString;
    /**
     * @hidden
     * Returns transformed 1d array from 2d year grid.
     */
    private _getYearList;
    /**
     * @hidden
     * Amount of years displayed in year view
     */
    private _getAmountOfYearsShownAtOnce;
    /**
     * @hidden
     * Method to put configuration and listeners on calendar keyboard service
     */
    private _setupKeyboardService;
    /** @hidden */
    private _focusOnCellByIndex;
    static ɵfac: i0.ɵɵFactoryDeclaration<CalendarYearViewComponent<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<CalendarYearViewComponent<any>, "fd-calendar-year-view", never, { "id": { "alias": "id"; "required": false; }; "focusEscapeFunction": { "alias": "focusEscapeFunction"; "required": false; }; "yearSelected": { "alias": "yearSelected"; "required": false; }; "yearViewGrid": { "alias": "yearViewGrid"; "required": false; }; "isDateRangeYearFormat": { "alias": "isDateRangeYearFormat"; "required": false; }; "rangeHoverEffect": { "alias": "rangeHoverEffect"; "required": false; }; "selectedRangeDate": { "alias": "selectedRangeDate"; "required": false; }; }, { "yearClicked": "yearClicked"; "selectedRangeDateChange": "selectedRangeDateChange"; }, never, never, true, never>;
}
