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

export default class CoUxDropdown extends Component {
    constructor(parent) {
      let selector = 'ux-dropdown';
      super(parent, selector);
      //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/ux-dropdown/ux-dropdown.component.ts
    }
    get dataE2E() {
      let path = '//div[@data-e2e = "ux-dropdown"]';
      return this.currentPath + path;
    }
    async isActive() {
      return await elementAttributeContains(this.dataE2E, 'class', 'd-block');
    }
    async isRightAligned() {
      return await elementAttributeContains(this.dataE2E, 'class', 'ux-dropdown-menu-right');
    }

}


