import Component  from '../component.js'

export default class CoUxWidgetManager extends Component {
    constructor(parent) {
      let selector = 'div[contains(@class, "ux-widget s-manager")]';
      super(parent, selector);
    }
    get gridsterItem() {
      let path = '//gridster-item';
      return this.currentPath + path;
    }
    gridsterItemByText(text) {
      let path = '//ng-component//*[@label = "' + text + '"]/ancestor::gridster-item[1]';
      return this.gridsterItem + path;
    }
    gridsterItemByIndex(index) {
      return '(' + this.gridsterItem + ')[' + index + ']';
    }
    gridsterItemByTextAndIndex(text, index) {
      let co = '(' + this.gridsterItemByText(text) + ')[' + index + ']';
      return co;
    }
    get widgetsAlertMessage () {
      let path = '//div[contains(@class,"mt-3")]//ux-alert';
      return this.currentPath + path;
    }

}


