import { FocusMonitor } from '@angular/cdk/a11y';
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
import { BreakpointObserver } from '@angular/cdk/layout';
import { AfterContentInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
import { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
import { CanUpdateErrorState, ErrorStateMatcher } from '@angular/material/core';
import { MatFormFieldControl } from '@angular/material/form-field';
import { _MatInputMixinBase, DejaConnectionPositionPair } from '@deja-js/component/core';
import { DateComponentLayout, DaysOfWeek, DejaDateSelectorComponent } from '@deja-js/component/date-selector';
import { Subject } from 'rxjs';
import { Pattern } from './models/pattern.model';
import * as i0 from "@angular/core";
/**
 * Date-picker component for Angular
 */
export declare class DejaDatePickerComponent extends _MatInputMixinBase implements OnInit, ControlValueAccessor, AfterContentInit, DoCheck, OnDestroy, MatFormFieldControl<Date | string>, CanUpdateErrorState {
    private elementRef;
    private changeDetectorRef;
    ngControl: NgControl;
    private fm;
    private breakpointObserver;
    static nextId: number;
    private static formattingTokens;
    id: string;
    describedBy: string;
    readonly dateChange: EventEmitter<string | Date>;
    readonly timeChange: EventEmitter<Date>;
    /** Maximum date avaliable inside date-picker */
    dateMax: Date;
    /** Minimum date avaliable inside date-picker */
    dateMin: Date;
    label: string;
    /** Disabled dates. It's an array of DaysOfWeek (number between 0 and 6) or a date. */
    disableDates: Array<DaysOfWeek | Date>;
    /** Reference to DejaDateSelectorComponent inside thic control */
    dateSelectorComponent: DejaDateSelectorComponent;
    /** Offset de position horizontal de la zone de dropdown */
    overlayOffsetX: number;
    /** Offset de position verticale de la zone de dropdown */
    overlayOffsetY: number;
    updateInputOn: 'change' | 'blur' | 'submit';
    get overlayContainerClass(): string;
    private inputValidatorDirective;
    get shouldLabelFloat(): boolean;
    _layout: NumberInput;
    /** Date format. If unset, format will be 'yyyy-MM-dd' + ' HH:mm' it's a date-time selector */
    set format(dateFormat: string);
    get format(): string;
    /** Placeholder for input */
    get placeholder(): string;
    set placeholder(plh: string);
    /** Afficher un bouton raccourcis permettant de sélectionner la date courante */
    set showCurrentDateButton(value: boolean);
    get showCurrentDateButton(): boolean;
    get ngModelOptions(): {
        updateOn: 'change' | 'blur' | 'submit';
    };
    /** matFormField implementation */
    stateChanges: Subject<void>;
    /** Permettre la saisie de texte libre */
    set allowFreeEntry(value: BooleanInput);
    get allowFreeEntry(): BooleanInput;
    /** Mask for input */
    _mask: string;
    get mask(): string;
    /** Pattern for input */
    _pattern: Pattern;
    get pattern(): Pattern;
    /** Internal use */
    overlayOwnerElement: HTMLElement;
    date: Date | string;
    /** matFormField focus implementation */
    focused: boolean;
    /** This property indicates whether the associated NgControl is in an error state. */
    errorState: boolean;
    /** This property allows us to specify a unique string for the type of control in form field.
     * The <mat-form-field> will add an additional class based on this type that can be used to
     * easily apply special styles to a <mat-form-field> that contains a specific type of control.
     * In this example we'll use deja-date-picker as our control type which will result in the form field
     * adding the class mat-form-field-deja-date-picker.
     */
    controlType: string;
    formatChanged$: Subject<string>;
    protected destroyed$: Subject<void>;
    private _allowFreeEntry;
    /** Default placeholder for input */
    private _placeholder;
    private _showCurrentDateButton;
    private _disabled;
    private _required;
    private _time;
    private _format;
    private inputElement$;
    private inputElement;
    private focus$;
    private _showDropDown;
    private _positions;
    private _inputModel;
    private cursorPosition;
    private dateChanged$;
    set inputElementRef(element: ElementRef<HTMLInputElement>);
    get inputModel(): string;
    set positions(value: DejaConnectionPositionPair[] | string);
    get positions(): DejaConnectionPositionPair[] | string;
    get empty(): boolean;
    /**
     * Constructor
     * subscribe on different events needed inside this component
     */
    constructor(elementRef: ElementRef<HTMLInputElement>, changeDetectorRef: ChangeDetectorRef, ngControl: NgControl, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, _defaultErrorStateMatcher: ErrorStateMatcher, fm: FocusMonitor, breakpointObserver: BreakpointObserver);
    onChangeCallback: (_a?: unknown) => void;
    onTouchedCallback: () => void;
    /** unsubscribe to all Observable when component is destroyed */
    ngOnDestroy(): void;
    /** Init mask */
    ngOnInit(): void;
    ngDoCheck(): void;
    /** This method is used by the <mat-form-field> to specify the IDs that should be used for the aria-describedby attribute of your component.
     * The method has one parameter, the list of IDs, we just need to apply the given IDs to our host element.
     */
    setDescribedByIds(ids: string[]): void;
    /** This method will be called when the form field is clicked on.
     * It allows your component to hook in and handle that click however it wants.
     * The method has one parameter, the MouseEvent for the click.
     * In our case we'll just focus the first <input> if the user isn't about to click an <input> anyways.
     */
    onContainerClick(event: MouseEvent): void;
    get showDropDown(): boolean;
    /** disabled property setter. Can be string or empty so you can use it like : <deja-date-picker disabled></deja-date-picker> */
    set disabled(value: boolean);
    /** disabled property getter. */
    get disabled(): boolean;
    /** required property setter. Can be string or empty so you can use it like : <deja-date-picker required></deja-date-picker> */
    set required(value: boolean);
    /** required property getter. */
    get required(): boolean;
    /**
     * Component Layout
     */
    set layout(value: DateComponentLayout | string);
    get layout(): string | DateComponentLayout;
    /**
     * Time property setter. Can be string or empty so you can use it like : <deja-date-picker time></deja-date-picker>
     * Used to add time selector next to calendar
     */
    set time(value: BooleanInput);
    /** Time property getter */
    get time(): BooleanInput;
    /** Method to close date-picker dialog */
    close(): boolean;
    /** Method to open date-picker dialog */
    open(): void;
    /** set accessor including call the onchange callback */
    set value(v: Date | string);
    /** get accessor */
    get value(): Date | string;
    /** From ControlValueAccessor interface */
    writeValue(value: Date | string): void;
    /** From ControlValueAccessor interface */
    registerOnChange(fn: (_a: unknown) => void): void;
    /** From ControlValueAccessor interface */
    registerOnTouched(fn: () => void): void;
    setDisabledState(isDisabled: boolean): void;
    /** For reactive form. */
    ngAfterContentInit(): void;
    /** Give focus to this component */
    setFocus(): void;
    /**
     * Called when user click on the input of this component.
     * If click is located on icon 'calendar' who is in the matPrefix of mat-form-field-container, the picker show off.
     *
     * @param event
     */
    toggleDateSelector(event: Event): boolean;
    /**
     * Called when input change. If it's a string it's because user set the date manually. So we need to convert it into date with MomentJs.
     *
     * @param date new value of this model
     */
    updateModel(date: string | Date): void;
    /** Reset date-picker values. */
    reset(): void;
    setToCurrentDate(): void;
    private selectHours;
    private incrementDateBySegment;
    private toDate;
    static ɵfac: i0.ɵɵFactoryDeclaration<DejaDatePickerComponent, [null, null, { optional: true; self: true; }, { optional: true; }, { optional: true; }, null, null, null]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DejaDatePickerComponent, "deja-date-picker", never, { "dateMax": "dateMax"; "dateMin": "dateMin"; "label": "label"; "disableDates": "disableDates"; "overlayOffsetX": "overlayOffsetX"; "overlayOffsetY": "overlayOffsetY"; "updateInputOn": "updateInputOn"; "format": "format"; "placeholder": "placeholder"; "showCurrentDateButton": "showCurrentDateButton"; "allowFreeEntry": "allowFreeEntry"; "positions": "positions"; "disabled": "disabled"; "required": "required"; "layout": "layout"; "time": "time"; }, { "dateChange": "dateChange"; "timeChange": "timeChange"; }, never, never>;
}
