import EuiBasePage from '../eui-base.po.js'
import CoUxDashboardCard from '../../../../components/10x/ux/ux-dashboard-card.js'

export default class DashboardCardPage extends EuiBasePage {
  constructor() {
      super();
  }
  dashboardCardByIndex(index) {
    let card =  new CoUxDashboardCard(this.mainContent);
    return card.byIndex(index);
  }
  dashboardCardByTextContains(text) {
    let card = new CoUxDashboardCard(this.mainContent);
    return card.byTextContains(text);
  }
  dashboardCardByTextEqualsAndIndex(text, index, normalize=true) {
    let card = new CoUxDashboardCard(this.mainContent);
    return card.byTextEqualsAndIndex(text, index, normalize);
  }
  dashboardCardFromSectionById(id) {
    return new CoUxDashboardCard(this.sectionById(id));
  }
  dashboardCardFromSectionWithIdByIndex(id, index) {
    let card1 = new CoUxDashboardCard(this.sectionById(id));
    return card1.byIndex(index);
  }
}


