import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
import { DaysOfWeek } from './date-utils';
import { TeliaLocalizedText } from './date-localization';
import { TeliaDateAdapter } from './date-adapter';
import { DatePickerDirectionsType } from '../../types/DatePickerDirection';
export declare type DateDisabledPredicate = (date: Date) => boolean;
export declare type VocaDatePickerChangeEvent = {
  component: 'telia-date-picker';
  valueAsDate: Date;
  value: string;
};
export declare type VocaDatePickerFocusEvent = {
  component: 'telia-date-picker';
};
export declare type VocaDatePickerBlurEvent = {
  component: 'telia-date-picker';
};
export declare type TeliaYearRange = {
  past: number;
  future: number;
};
export declare class TeliaDatePicker implements ComponentInterface {
  /**
   * Own Properties
   */
  private monthSelectId;
  private yearSelectId;
  private dialogLabelId;
  private body;
  private datePickerButton;
  private datePickerInput;
  private firstFocusableElement;
  private monthSelectNode;
  private dialogWrapperNode;
  private focusedDayNode;
  private focusTimeoutId;
  private initialTouchX;
  private initialTouchY;
  /** Tracking id is used to identify and count Component usage */
  private dataTrackingId;
  /**
   * Whilst dateAdapter is used for handling the formatting/parsing dates in the input,
   * these are used to format dates exclusively for the benefit of screen readers.
   *
   * We prefer DateTimeFormat over date.toLocaleDateString, as the former has
   * better performance when formatting large number of dates. See:
   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance
   */
  private dateFormatShort;
  private dateFormatLong;
  private range;
  /** Test id set for web component host */
  dataTestid: string;
  /** ID of the form this component belongs to. Should only be set If the component is not wrapped inside its form element. */
  htmlForm: string;
  /** Name of the date picker input. */
  name: string;
  /** Label of input */
  label: string;
  /** Additional description. Describe here input format. */
  additional?: string;
  /** Additional description id */
  additionalId: string;
  /** Input element id */
  inputId: string;
  /** Makes the date picker input component disabled. This prevents users from being able to interact with the input, and conveys its inactive state to assistive technologies. */
  disabled: boolean;
  /** Defines a specific role attribute for the date picker input. */
  role: string;
  /** Button aria-label for assistive technologies */
  buttonLabel: string;
  /**
   * Forces the opening direction of the calendar modal to be always left or right.
   * This setting can be useful when the input is smaller than the opening date picker
   * would be as by default the picker always opens towards right.
   */
  direction: DatePickerDirectionsType;
  /** Enable readonly state */
  readonly: boolean;
  /** Should the input be marked as required? */
  required: boolean;
  /** Date value. Must be in IS0-8601 format: YYYY-MM-DD. */
  value: string;
  /** Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD. This setting can be used alone or together with the max property. */
  min: string;
  /** Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD. This setting can be used alone or together with the min property. */
  max: string;
  /** Year range specifies the range of the years to be displayed in past and future, default value is 10 years */
  yearRange: TeliaYearRange | string;
  /** Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc. Default is Monday. */
  firstDayOfWeek: DaysOfWeek;
  /** Button labels, day names, month names, etc, used for localization. Default is English. */
  localization: TeliaLocalizedText;
  /**
   * Date adapter, for custom parsing/formatting.
   * Must be object with a `parse` function which accepts a `string` and returns a `Date`,
   * and a `format` function which accepts a `Date` and returns a `string`.
   * Default is IS0-8601 parsing and formatting.
   */
  dateAdapter: TeliaDateAdapter;
  /** Indicates if the modal is open */
  modalOpen: boolean;
  /** Controls which days are disabled and therefore disallowed. For example, this can be used to disallow selection of weekends. */
  isDateDisabled: DateDisabledPredicate;
  /** Error description id */
  errorId: string;
  /** General error message, which overrides other error messages and is shown at initial render */
  errorMessage?: string;
  /** Error message to be shown if user writes invalid date */
  invalidErrorMessage: string;
  /** Error message for required */
  requiredErrorMessage?: string;
  /** Reference to host HTML element. */
  element: HTMLTeliaDatePickerElement;
  activeFocus: boolean;
  focusedDay: Date;
  open: boolean;
  /** Error message */
  errorMessageState: string;
  /** Input has been blurred at least once */
  touched: boolean;
  /** Event emitted when a valid date is selected or written. */
  vocaChange: EventEmitter<VocaDatePickerChangeEvent>;
  /** Event emitted the date picker input is blurred. */
  vocaBlur: EventEmitter<VocaDatePickerBlurEvent>;
  /** Event emitted the date picker input is focused. */
  vocaFocus: EventEmitter<VocaDatePickerFocusEvent>;
  connectedCallback(): void;
  componentWillLoad(): void;
  componentDidRender(): void;
  yearRangeChanged(newValue: TeliaYearRange | string): void;
  createDateFormatters(): void;
  /**
   * Component event handling.
   */
  handleDocumentClick(e: MouseEvent): void;
  /**
   * Public methods API
   */
  /**
   * Sets focus on the date picker's input. Use this method instead of the global `focus()`.
   */
  setFocus(): Promise<void>;
  /**
   * Show the calendar modal, moving focus to the calendar inside.
   */
  show(): Promise<void>;
  /**
   * Hide the calendar modal. Set `moveFocusToButton` to false to prevent focus
   * returning to the date picker's button. Default is true.
   */
  hide(moveFocusToButton?: boolean): Promise<void>;
  /**
   * Local methods.
   */
  private toggleSmallScreenScroll;
  private enableActiveFocus;
  private disableActiveFocus;
  private addDays;
  private addMonths;
  private addYears;
  private startOfWeek;
  private endOfWeek;
  private setMonth;
  private setYear;
  private setFocusedDay;
  private toggleOpen;
  private handleEscKey;
  private handleBlur;
  private handleFocus;
  private handleTouchStart;
  private handleTouchEnd;
  private handleNextMonthClick;
  private handlePreviousMonthClick;
  private handleFirstFocusableKeydown;
  private handleCloseButtonClick;
  private handleKeyboardNavigation;
  private handleDaySelect;
  private handleMonthSelect;
  private handleYearSelect;
  private handleInputChange;
  private setValue;
  private processFocusedDayNode;
  /**
   * Helper for updating touched state, so we can update touched
   * state from functional component.
   */
  private makeTouched;
  /**
   * Return true if input value is following date input format.
   */
  private isValueValid;
  /**
   * Update error message and keep native input error message in sync.
   */
  private updateErrorMessage;
  /**
   * Check if input value is empty, so required should be triggered.
   */
  private isValueMissing;
  private updateErrorState;
  private setToggleRef;
  private setTextInputRef;
  private setDialogWrapperRef;
  private setCloseButtonRef;
  private setMonthSelectRef;
  /**
   * render() function
   * Always the last one in the class.
   */
  render(): any;
}
