import { UniDriver } from '@wix/unidriver-core';
import { BaseUniDriver } from '@wix/wix-ui-test-utils/unidriver';
import { DropdownLayoutUniDriver } from '../DropdownLayout/DropdownLayout.uni.driver';

export interface CalendarUniDriver extends BaseUniDriver {
  exists: () => Promise<boolean>;
  close: () => Promise<any>;
  getCurrentMonthWithYear: () => Promise<string>;
  getMonthAndYear: () => Promise<string[]>;
  getNthWeekDayName: (n: number) => Promise<string>;
  clickOnNthDay: (n: number) => Promise<any>;
  clickDay: (date: Date) => Promise<any>;
  isDayActive: (date: Date) => Promise<boolean>;
  clickOnNthDayOfTheMonth: (n: number) => Promise<any>;
  clickOnSelectedDay: () => Promise<any>;
  clickOnYearDropdown: () => Promise<any>;
  clickOnMonthDropdown: () => Promise<any>;
  clickOnNthYear: (n: number) => Promise<any>;
  clickOnPrevMonthButton: () => Promise<any>;
  clickOnNextMonthButton: () => Promise<any>;
  keyboardNextYear: () => Promise<void>;
  keyboardPrevYear: () => Promise<void>;
  isHeaderExists: () => Promise<boolean>;
  isYearDropdownExists: () => Promise<boolean>;
  isYearCaptionExists: () => Promise<boolean>;
  isMonthDropdownExists: () => Promise<boolean>;
  isMonthCaptionExists: () => Promise<boolean>;
  getMonthCaption: () => Promise<string>;
  getMonthDropdownLabel: () => Promise<string>;
  getSelectedYear: () => Promise<string>;
  getFocusedDay: () => Promise<string | null>;
  getFocusedDayElement: () => UniDriver;
  pressLeftArrow: () => Promise<any>;
  pressRightArrow: () => Promise<any>;
  getSelectedDay: () => Promise<string>;
  triggerKeyDown: ({ key }?: { key: string }) => Promise<any>;
  isFocusedDayVisuallyUnfocused: () => Promise<boolean>;
  isTwoMonthsLayout: () => Promise<boolean>;
  getMonthDropdownDriver: () => Promise<DropdownLayoutUniDriver>;
  getYearDropdownDriver: () => Promise<DropdownLayoutUniDriver>;
  getNumOfVisibleMonths: () => Promise<number>;
  getNumOfSelectedDays: () => Promise<number>;
  getSelectedDays: () => Promise<number>;
  getSize: () => Promise<string>;
}
