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

export default class CoUxLayoutOverlayPanel extends Component {
    constructor(parent) {
      let selector = 'ux-layout-overlay-panel';
      super(parent, selector);
      //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/core/src/lib/commons/ux-components/layout/ux-layout-overlay-panel/ux-layout-overlay-panel.component.ts?at=support/7.x
    }
    get dataE2E() {
      let path = '//div[@data-e2e = "ux-layout-overlay-panel"]';
      return this.currentPath + path;
    }

    async isActive() {
      return await elementAttributeContains(this.dataE2E, 'class', 'active');
    }
    async isSmall() {
      return await elementAttributeContains(this.dataE2E, 'class', 'overlay-panel--small');
    }
    async isMedium() {
      return await elementAttributeContains(this.dataE2E, 'class', 'overlay-panel--medium');
    }
    async isLarge() {
      return await elementAttributeContains(this.dataE2E, 'class', 'overlay-panel--large');
    } 
}


