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

export default class CoEuitooltip extends Component {
    constructor(parent) {
      let selector = '*[contains(@class,"eui-tooltip")]' ;
      super(parent, selector);
      // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/directives/eui-tooltip.directive.ts?at=support/13.x
    }
    async hasContent() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--content-');
    }
    async hasContentLeft() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--content-left');
    }
    async hasContentRight() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--content-right');
    }
    async hasContentCenter() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--content-center');
    }
    async hasContentJustify() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--content-justify');
    }
    async isPrimary() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--primary');
    }
    async isSecondary() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--secondary');
    }
    async hasInfo() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--info');
    }
    async hasSuccess() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--success');
    }
    async hasWarning() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--warning');
    }
    async hasDanger() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--danger');
    }
    async hasAccent() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--accent');
    }
    async hasRounded() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--rounded');
    }
    async hasArrows() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--arrows');
    }
    async isDisabled() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--disabled');
    }
    async hasPositionLeft() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--left');
    }
    async hasPositionAbove() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--above');
    }
    async hasPositionRight() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--right');
    }
    async hasPositionBefore() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--before');
    }
    async hasPositionBelow() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--below');
    }
    async hasPositionAfter() {
      return await elementAttributeContains(this.currentPath, 'class', 'eui-tooltip--after');
    }
}


