import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit, SimpleChanges } from "@angular/core";
import { BehaviorSubject } from "rxjs";
import { DxcTextInputComponent } from "../dxc-text-input/dxc-text-input.component";
import { DxcDateInputHelper } from "./dxc-date-input.helper";
import { MatCalendar } from "@angular/material/datepicker";
import { Moment } from "moment";
import { MdePopoverTrigger } from "@material-extended/mde";
import * as i0 from "@angular/core";
declare type Size = "medium" | "large" | "fillParent";
declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
declare type Margin = {
    top?: Space;
    bottom?: Space;
    left?: Space;
    right?: Space;
};
export declare class DxcDateInputComponent implements OnInit {
    private helper;
    private cdRef;
    className: any;
    /**
     * Text to be placed above the date.
     */
    label: string;
    /**
     * Name attribute of the input element.
     */
    name: string;
    /**
     * Value of the input element. If undefined, the component will be uncontrolled and the value will be managed internally by the component.
     */
    value: string;
    /**
     * Helper text to be placed above the date.
     */
    helperText: string;
    /**
     * The format in which the date value will be displayed. User must follow this format when editing the value or it will be considered as an invalid date.
     * In this case, the onBlur and onChange events will be called with an internal error as a parameter reporting the situation.
     */
    format: string;
    /**
     * If true, the component will be disabled.
     */
    get disabled(): boolean;
    set disabled(value: boolean);
    private _disabled;
    /**
     * If true, the date format will appear as placeholder in the field.
     */
    get placeholder(): boolean;
    set placeholder(value: boolean);
    private _placeholder;
    /**
     * If true, the date will be optional, showing (Optional) next to the label. Otherwise, the field will be considered required
     * and an error will be passed as a parameter to the OnBlur and onChange events when it has not been filled.
     */
    get optional(): boolean;
    set optional(value: boolean);
    private _optional;
    /**
     * If true, the date input will have an action to clear the entered value.
     */
    get clearable(): boolean;
    set clearable(value: boolean);
    private _clearable;
    /**
     * If it is defined, the component will change its appearance, showing the error below the date input component.
     * If it is not defined, the error messages will be managed internally, but never displayed on its own.
     */
    error: string;
    /**
     * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
     * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
     */
    margin: Space | Margin;
    /**
     * Size of the component.
     */
    size: Size;
    /**
     * Value of the tabindex attribute.
     */
    tabIndex: number;
    autocomplete: string;
    defaultInputs: BehaviorSubject<any>;
    /**
     * This event will emit in case the user types within the input element of the component. An object including the string value,
     * the error and the date value will be emitted. If the string value is a valid date, error will be null.
     * Also, if the string value is not a valid date, date will be null.
     */
    onChange: EventEmitter<{
        value: string;
        error: string | null;
        date: Date | null;
    }>;
    /**
     * This event will emit in case the input element loses the focus. An object including the string value,
     * the error and the date value will be emitted. If the string value is a valid date, error will be null.
     * Also, if the string value is not a valid date, date will be null.
     */
    onBlur: EventEmitter<{
        value: string;
        error: string | null;
        date: Date | null;
    }>;
    /**
     * Reference to the component.
     */
    dxcInputRef: DxcTextInputComponent;
    renderedValue: string;
    dateValue: Moment;
    popOverOffsetX: any;
    calendarDynamicStyle: any;
    _dxcTrigger: MdePopoverTrigger;
    _dxcCalendar: MatCalendar<Moment>;
    calendar: ElementRef;
    private _sizes;
    private _isOpenClicked;
    private _isCalendarOpened;
    private _isSelectingDate;
    private controlled;
    onClickOutsideHandler(event: any): void;
    constructor(helper: DxcDateInputHelper, cdRef: ChangeDetectorRef);
    ngOnChanges(changes: SimpleChanges): void;
    ngOnInit(): void;
    ngAfterViewInit(): void;
    private calculateComponentValues;
    removeRippleCalendarControls(): void;
    handleOnChange(value: any): void;
    handleOnBlur(event: any): void;
    onSelectedChangeHandler(value: Moment): void;
    private checkOpenCalendar;
    handleCalendar(): void;
    closeCalendar(): void;
    onSelectingDateHandler(): void;
    private resetCalendarState;
    private getMomentValue;
    private getDateStringValue;
    static ɵfac: i0.ɵɵFactoryDeclaration<DxcDateInputComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DxcDateInputComponent, "dxc-date-input", never, { "label": "label"; "name": "name"; "value": "value"; "helperText": "helperText"; "format": "format"; "disabled": "disabled"; "placeholder": "placeholder"; "optional": "optional"; "clearable": "clearable"; "error": "error"; "margin": "margin"; "size": "size"; "tabIndex": "tabIndex"; "autocomplete": "autocomplete"; }, { "onChange": "onChange"; "onBlur": "onBlur"; }, never, never>;
}
export {};
//# sourceMappingURL=dxc-date-input.component.d.ts.map