import Component  from '../component.js';
import CoEuiDashboardButtonIcon from './eui-dashboard-button-icon.js';
import CoEuiDashboardButtonLabel from './eui-dashboard-button-label.js';
import CoEuiLabel from './eui-label.js';
import DivComponent from '../div.js';

export default class CoEuiDashboardButton extends Component {
  constructor(parent) {
    let selector = 'eui-dashboard-button';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-dashboard-button/eui-dashboard-button.component.html?at=master
  }
  get contentCO() {
    return new DivComponent(this.currentPath).addPredicateClassContains('eui-dashboard-button__content');
  }
  get mainIconCO() {
    return new DivComponent(this.contentCO).addPredicateClassContains('eui-dashboard-button__content-main-icon');
  }
  async hasEuiDashboardButtonIcon() {
    return await (await this.mainIconCO.element()).isExisting();
  }
  get iconElementCO() {
    return new DivComponent(this.mainIconCO).addPredicateClassContains('eui-dashboard-button__content-icon-element');
  }
  get euiDashboardButtonIconCO() {
    return new CoEuiDashboardButtonIcon(this.iconElementCO);
  }
  get mainLabelCO() {
    return new DivComponent(this.contentCO).addPredicateClassContains('eui-dashboard-button__content-main-label');
  }
  get euiDashboardButtonLabelCO() {
    return new CoEuiDashboardButtonLabel(this.mainLabelCO);
  }
  get contentTitleCO() {
    return new DivComponent(this.contentCO).addPredicateClassContains('eui-dashboard-button__content-title');
  }
  get euiLabelCO() {
    return new CoEuiLabel(this.contentTitleCO);
  }
  get subtitleCO() {
    return new DivComponent(this.contentCO).addPredicateClassContains('eui-dashboard-button__content-sub-title');
  }
  get euiSubLabelCO() {
    return new CoEuiLabel(this.subtitleCO);
  }
}


