"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _LoginForm = _interopRequireDefault(require("./LoginForm"));

var _Notification = _interopRequireDefault(require("./Notification"));

var _Page = _interopRequireDefault(require("./Page"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

class LoginPage extends _Page.default {
  constructor() {
    super();
    this.url = '/login';
    this.selector = '.cspace-ui-LoginPage--common';
    this.loginForm = new _LoginForm.default();
    this.notification = new _Notification.default();
  }

  getNotificationText() {
    return this.notification.getText();
  }

  getPromptText() {
    return this.loginForm.getPromptText();
  }

  setUsername(username) {
    this.loginForm.setUsername(username);
    return this;
  }

  setPassword(password) {
    this.loginForm.setPassword(password);
    return this;
  }

  clickSubmitButton() {
    this.loginForm.clickSubmitButton();
    return this;
  }

  enterUsernameInput() {
    this.loginForm.enterUsernameInput();
    return this;
  }

  enterPasswordInput() {
    this.loginForm.enterPasswordInput();
    return this;
  }

  submit() {
    return this.clickSubmitButton();
  }

  login(username, password) {
    this.loginForm.login(username, password);
    return this;
  }

}

exports.default = LoginPage;