import Component  from '../component.js'

export default class CoUxAlert extends Component {

    constructor(parent) {
      let selector = 'ux-alert';
      super(parent, selector);
    }
    /**
    * @type WebdriverIO.Element
    */
    get contentContainer() {
      let path = '//div[contains(@class,"ux-alert__content-container")]';
      return this.currentPath + path;
    }
    /**
    * @type boolean
    */
    async isCloseable() {
      let cl = await (await $(this.contentContainer + '//div[contains(@class,"ux-alert__close")]')).isExisting();
      if (cl) {
         return true;
      } else {
         return false;
      }
    }
    /**
    * @type WebdriverIO.Element
    */
    get alertIcon() {
      let path = '//div[contains(@class,"icon")]';
      return this.contentContainer + path;
    }
    /**
    * @type WebdriverIO.Element
    */
    get alertClose() {
      let path = '//div[contains(@class,"ux-alert__close")]';
      return this.contentContainer + path;
    }
}


