import Component  from '../component.js'
import { elementAttributeContains } from '../../core/utils.js'

export default class CoEuiIcon extends Component {
    constructor(parent) {
      let selector = '*[self::eui-icon  or self::span[@euiIcon] or self::i[@euiIcon]]';
      super(parent, selector);
      // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/atoms/eui-icon/eui-icon.component.ts?at=support/13.x
    }
    async isLoading() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-u-loading');
    }
}
