import Component  from '../component.js';

export default class MatCalendarHeader extends Component {
    constructor(parent) {
      let selector = 'div[contains(@class, "mat-calendar-header")]';
      super(parent, selector);
    // https://github.com/angular/components/blob/master/src/material/datepicker/calendar-header.html
    }
    get calendarControl() {
        let path = '//div[contains(@class, "mat-calendar-controls")]';
        return this.currentPath + path;
    }
    get calendarPeriodButton() {
        let path = '//button[contains(@class, "mat-calendar-period-button")]';
        return this.calendarControl + path;
        // we can check the atribute: label -> "Choose month and year" / "Choose date"
    }
    get buttonWrapper() {
        let path = '//span[contains(@class, "mat-button-wrapper")]';
        return this.calendarPeriodButton + path;
        // getting the text from this we can find out the current date
    }
    get arrowButton() {
        let path = '//div[contains(@class, "mat-calendar-arrow")]';
        return this.getButtonWrapper + path;
    }
    get matCalendarSpacer() {
        let path = '//div[contains(@class, "mat-calendar-spacer")]';
        return this.calendarControl + path;
    }
    get calendarNextButton() {
        let path = '//button[contains(@class, "mat-calendar-next-button")]';
        return this.getCalendarControl + path;
    }
    get calendarPreviousButton() {
        let path = '//button[contains(@class, "mat-calendar-previous-button")]';
        return this.getCalendarControl + path;
    }
}

