import { AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { RtlService } from '@fundamental-ngx/cdk/utils';
import { DatetimeAdapter } from '@fundamental-ngx/core/datetime';
import { ContentDensityObserver } from '@fundamental-ngx/core/content-density';
import { Meridian, SelectableViewItem } from './models';
import { TimeColumnComponent } from './time-column/time-column.component';
import * as i0 from "@angular/core";
export type FdTimeActiveView = 'hour' | 'minute' | 'second' | 'meridian';
type HourViewItem = SelectableViewItem<number>;
type MinuteViewItem = SelectableViewItem<number>;
type SecondViewItem = SelectableViewItem<number>;
type MeridianViewItem = SelectableViewItem<Meridian>;
export declare class TimeComponent<D> implements OnInit, OnChanges, OnDestroy, AfterViewInit, ControlValueAccessor {
    private _changeDetectorRef;
    private _elementRef;
    private _dateTimeAdapter;
    readonly _contentDensityObserver: ContentDensityObserver;
    private _rtlService;
    /**
     * @Input When set to false, uses the 24 hour clock (hours ranging from 0 to 23)
     * and does not display a period control.
     */
    meridian: boolean;
    /**
     *  @Input When set to false, does not set the input field to invalid state on invalid entry.
     */
    validate: boolean;
    /**
     * @Input when set to true, time inputs won't allow to have 1 digit
     * for example 9 will become 09
     * but 12 will be kept as 12.
     */
    keepTwoDigits: boolean;
    /**
     * @Input Disables the component.
     */
    disabled: boolean;
    /**
     * @Input When set to false, hides the input for seconds.
     */
    displaySeconds: boolean;
    /** @Input When set to false, hides the input for minutes. */
    displayMinutes: boolean;
    /**
     * When set to false, hides the input for hours
     */
    displayHours: boolean;
    /** @Input Defines if time component should be used in tablet mode */
    tablet: boolean;
    /** @Input Defines quantity of the elements, that are visible at the same time. Should be odd number */
    elementsAtOnce: number;
    /**
     * @Input An object that contains datetime representation
     */
    time: D;
    /** @Input Whether to show spinner buttons */
    spinnerButtons: boolean;
    /** @hidden */
    columns: QueryList<TimeColumnComponent<number, SelectableViewItem<number>>>;
    /** Active column view to iterate with */
    activeView: FdTimeActiveView;
    /** Offset */
    get offset(): number;
    /**
     * @hidden
     * container for [0 - 23] hours
     */
    hourViewItems: HourViewItem[];
    /**
     * @hidden
     * reference to currently selected hourViewItems element
     */
    activeHourViewItem?: HourViewItem;
    /**
     * @hidden
     * container for [0 - 59] minutes
     */
    minuteViewItems: MinuteViewItem[];
    /**
     * @hidden
     * reference to currently selected minuteViewItems element
     */
    activeMinuteViewItem?: MinuteViewItem;
    /**
     * @hidden
     * container for [0 - 59] seconds
     */
    secondViewItems: SecondViewItem[];
    /**
     * @hidden
     * reference to currently selected secondViewItems element
     */
    activeSecondViewItem?: SecondViewItem;
    /**
     * @hidden
     * container for [am, pm] meridian values
     */
    meridianViewItems: MeridianViewItem[];
    /**
     * @hidden
     * reference to currently selected meridianViewItems element
     */
    activeMeridianViewItem?: MeridianViewItem;
    /** @hidden */
    private readonly _destroyRef;
    /** @hidden */
    private _subscriptions;
    /** @hidden */
    constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, _dateTimeAdapter: DatetimeAdapter<D>, _contentDensityObserver: ContentDensityObserver, _rtlService: RtlService);
    /** @hidden */
    ngOnInit(): void;
    /** @hidden
     * Reacts only when there is meridian or time input change
     */
    ngOnChanges(changes: SimpleChanges): void;
    /** @hidden */
    ngOnDestroy(): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    onChange: (value: D) => void;
    /** @hidden */
    onTouched: () => void;
    /** @hidden */
    registerOnChange(fn: (time: D) => void): void;
    /** @hidden */
    registerOnTouched(fn: any): void;
    /** @hidden */
    setDisabledState(isDisabled: boolean): void;
    /** @hidden */
    refreshColumns(): void;
    /**
     * @hidden
     * Handles meridian change.
     * This implicitly changes hours by +/- 12
     */
    handleMeridianChange(meridian: Meridian): void;
    /** @hidden */
    handleSecondChange(second: number): void;
    /** @hidden */
    handleMinuteChange(minute: number): void;
    /**
     * @hidden
     * Handles changes of displayed hour value from template.
     */
    handleHourChange(hour: number): void;
    /** @hidden */
    handleNextColumnFocus(column: FdTimeActiveView): void;
    /** @hidden */
    handlePreviousColumnFocus(column: FdTimeActiveView): void;
    /** @hidden */
    handleKeyDownEvent(event: KeyboardEvent): void;
    /** @hidden */
    writeValue(time: D): void;
    /** @hidden */
    changeActive(view: FdTimeActiveView): void;
    /** @hidden */
    isActive(view: FdTimeActiveView): boolean;
    /** @hidden */
    focusActiveColumn(): void;
    /** @hidden */
    private _focusOut;
    /**
     * Get visible time columns
     * @returns visible columns list @see {FdTimeActiveView[]}
     */
    private _getVisibleColumns;
    /**
     * Get visible columns taking into account RTL
     * @returns visible columns list @see {FdTimeActiveView[]}
     */
    private _getVisibleColumnsWithRtl;
    /** @hidden */
    private _setUpViewGrid;
    /** @hidden */
    private _setUpActiveViewItems;
    /** @hidden */
    private _constructHourViewItems;
    /** @hidden */
    private _constructMinuteViewItems;
    /** @hidden */
    private _constructSecondViewItems;
    /** @hidden */
    private _constructMeridianViewItems;
    /** @hidden */
    private _calculateActiveHourViewItem;
    /** @hidden */
    private _calculateActiveMinuteViewItem;
    /** @hidden */
    private _calculateActiveSecondViewItem;
    /** @hidden */
    private _calculateActiveMeridianViewItem;
    /**
     * @hidden
     * Model hours (0 - 23)
     */
    private _getModelHour;
    /**
     * @hidden
     * Model minutes (0 - 59)
     */
    private _getModelMinute;
    /**
     * @hidden
     * Model seconds (0 - 59)
     */
    private _getModelSecond;
    /**
     * @hidden
     * Get meridian period based on a given hours
     */
    private _getDayPeriodByHour;
    /** @hidden */
    private _isPm;
    /**
     * @hidden
     * @returns default time 00:00:00
     */
    private _getDefaultValue;
    static ɵfac: i0.ɵɵFactoryDeclaration<TimeComponent<any>, [null, null, { optional: true; }, null, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TimeComponent<any>, "fd-time", never, { "meridian": { "alias": "meridian"; "required": false; }; "validate": { "alias": "validate"; "required": false; }; "keepTwoDigits": { "alias": "keepTwoDigits"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "displaySeconds": { "alias": "displaySeconds"; "required": false; }; "displayMinutes": { "alias": "displayMinutes"; "required": false; }; "displayHours": { "alias": "displayHours"; "required": false; }; "tablet": { "alias": "tablet"; "required": false; }; "elementsAtOnce": { "alias": "elementsAtOnce"; "required": false; }; "time": { "alias": "time"; "required": false; }; "spinnerButtons": { "alias": "spinnerButtons"; "required": false; }; }, {}, never, never, true, never>;
}
export {};
