import { CdkConnectedOverlay, Overlay } from '@angular/cdk/overlay';
import { ElementRef, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
import { ValidationMessageService } from '../../core/validation-message.service';
import { DateDisplayPipe } from '../../shared/display/pipes/date-display.pipe';
import { FormGroupHelper } from '../../shared/form-group.helper';
import { UserPreferenceService } from '../../shared/user-preference.service';
import { CalendarSelection } from '../calendar/calendar.types';
import { FormControlBase } from '../form-control-base';
import * as i0 from "@angular/core";
export type DateInputFormControl = FormControl<Date | null>;
export declare class DateInputComponent extends FormControlBase implements OnInit {
    protected validationMessageService: ValidationMessageService;
    protected formGroupHelper: FormGroupHelper;
    private userPreferenceService;
    private dateDisplayPipe;
    private el;
    private overlayService;
    id: string;
    /** The form control provided by the hosting form. */
    formModel: DateInputFormControl;
    minDate: Date;
    maxDate: Date;
    /** The internal textbox's form control. */
    textboxControl: FormControl<string | null>;
    /**
     * The current calendar selection.
     * Updated when the user clicks on a calendar item or when the date entered into the textbox is parsed.
     */
    calendarSelection: CalendarSelection | null;
    /** Controls whether the calendar overlay is open or not. */
    isCalendarOpen: boolean;
    /** Placeholder for the textbox. Updated to reflect the user's date display preference. */
    placeholder: string;
    /** Overlay scroll strategy for the calendar overlay. Closes the calendar on scroll. */
    overlayScrollStrategy: import("@angular/cdk/overlay").CloseScrollStrategy;
    /**
     * Date parsing formats for user-entered dates. Defaults to month-first formats, but is updated in onInit
     * to use the user's preferred date format.
     */
    private parseFormats;
    /** Reference to the overlay directive (see template). Used to access the overlay's host element to control focus. */
    overlay?: CdkConnectedOverlay;
    constructor(validationMessageService: ValidationMessageService, formGroupHelper: FormGroupHelper, userPreferenceService: UserPreferenceService, dateDisplayPipe: DateDisplayPipe, el: ElementRef, overlayService: Overlay);
    /** Focuses the input whenever the calendar is shift-tabbed out of. */
    onCalendarFocusOutStart(event: KeyboardEvent): void;
    /** Closes the calendar and focuses the input whenever the calendar is tabbed out of. */
    onCalendarFocusOutEnd(event: KeyboardEvent): void;
    /** Close the calendar if the user clicks outside of the calendar and date input. */
    onOverlayOutsideClick(event: MouseEvent): void;
    /** If the user tabs out of the form control's action button and the calendar is open, focus the first item in the calendar overlay */
    onActionKeydown(event: KeyboardEvent): void;
    onTextboxKeydown(event: KeyboardEvent): void;
    /** Whenever the user selects a date from the calendar, update the formModel with the selection */
    onSelectionChange(selection: CalendarSelection | null): void;
    onTextboxBlur(): void;
    ngOnInit(): void;
    private onFormModelStatusChanges;
    private onFormModelValueChanges;
    private onTextboxValueChanges;
    private syncTextboxControlDisabledStatus;
    /**
     * Updates the date parsing formats and placeholder based on the user's display preference.
     * NOTE: This is async because we're retrieving the user's preferences. We're not awaiting the result
     * because the only logic that depends on this is the text box date parsing logic and placeholder.
     * Our forms should always be behind a pending overlay, so the user won't be able to interact with the
     * form until the user is loaded anyway.
     */
    private setDateFormats;
    /**
     * Validator that checks if the date is within the min and max date range.
     * If the date is outside of the range, the validator returns an error that
     * triggers the validation message service to show the error in the label.
     */
    private dateValidator;
    /** Focuses the date input. */
    private focusInput;
    static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "ec-date-input", never, { "id": { "alias": "id"; "required": false; }; "formModel": { "alias": "formModel"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, {}, never, never, false, never>;
}
