import Component from '../../component.js'
import CoUxErrorOutputFeedback from './ux-error-output-feedback.js'

export default class CoUxErrorOutput extends Component {
    constructor(parent) {
      let selector = 'ux-error-output';
      super(parent, selector);
      //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/ux-error-output/ux-error-output.component.html
    }
    get dataE2E(){
      let path = '//div[@data-e2e = "ux-error-output"]';
      return  this.currentPath + path;
    }
    get errorOutputFeedbackCO(){
      let path = '//div'
      return new CoUxErrorOutputFeedback(this.dataE2E + path);
    }
    async isAlert() {
      return await (await $(this.errorOutputFeedbackCO.alertCO.currentPath)).isExisting();
    }
    async isFeedback() {
      return await (await $(this.errorOutputFeedbackCO.controlFeedbackCO.currentPath)).isExisting();
    }

}


