import Component from '../component.js'
import { elementAttributeContains } from '../../core/utils.js'
import CoEuiIconSvg from './eui-icon-svg.js';
import SpanComponent from '../span.js';


export default class CoEuiMenuItemIconContent extends Component {
  constructor(parent) {
    super(parent);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-menu/eui-menu-item.component.html
  }
  get iconCO() {
    return new CoEuiIconSvg(this.currentPath);
  }
  get initialsCO(){
    return new SpanComponent(this.currentPath).addPredicateClassContains('eui-menu-item__link-initials');
  }
  async hasCollapsedInitials(){
    return await (await this.initialsCO.element()).isExisting();
  }
  async hasMarker() {
    return await elementAttributeContains(this.iconCO.currentPath, 'class', 'eui-menu-item__link-marker');
  }
}
