import Component  from '../component.js'
import { elementAttributeContains } from '../../core/utils.js'
const attribute = 'eui-tooltip'

export default class CoEuitooltip extends Component {
    constructor(parent) {
      let selector = '*[@euiTooltip]';
      super(parent, selector);
      // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/directives/eui-tooltip/eui-tooltip.directive.ts
    }
    async hasPositionLeft() {
      return await elementAttributeContains(this.currentPath, 'class', attribute + '--left');
    }
    async hasPositionAbove() {
      return await elementAttributeContains(this.currentPath, 'class', attribute + '--above');
    }
    async hasPositionRight() {
      return await elementAttributeContains(this.currentPath, 'class', attribute + '--right');
    }
    async hasPositionBefore() {
      return await elementAttributeContains(this.currentPath, 'class', attribute + '--before');
    }
    async hasPositionBelow() {
      return await elementAttributeContains(this.currentPath, 'class', attribute + '--below');
    }
    async hasPositionAfter() {
      return await elementAttributeContains(this.currentPath, 'class', attribute + '--after');
    }
}


