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/components/src/lib/ux-components/layout/ux-layout-overlay-panel/ux-layout-overlay-panel.component.ts?at=support/10.x
    }
    get overlayoutPanel() {
      let path = '//div[contains(@class,"overlay-panel")]';
      return this.currentPath + path;
    }
    async isActive() {
      return await elementAttributeContains(this.overlayoutPanel, 'class', 'active');
    }
    async isSmall() {
      return await elementAttributeContains(this.overlayoutPanel, 'class', 'overlay-panel--small');
    }
    async isMedium() {
      return await elementAttributeContains(this.overlayoutPanel, 'class', 'overlay-panel--medium');
    }
    async isLarge() {
      return await elementAttributeContains(this.overlayoutPanel, 'class', 'overlay-panel--large');
    }
}


