import CoEuiFileUpload from '../../../../components/10x/eui/eui-file-upload.js'
import CoEuiFilePreview from '../../../../components/10x/eui/eui-file-preview.js'
import EuiBasePage from '../eui-base.po.js'

export default class FileUploadPage extends EuiBasePage {
  constructor() {
      super();
  }
  fileUploadByIndex(index) {
    return  new CoEuiFileUpload(this.mainContent).byIndex(index);
  }
  fileUploadByTextContains(text) {
    return new CoEuiFileUpload(this.mainContent).byTextContains(text);
  }
  fileUploadByTextAndIndex(text, index, normalize=true) {
    return new CoEuiFileUpload(this.mainContent).byTextEqualsAndIndex(text, index, normalize);
  }
  fileUploadFromSectionById(id) {
    return new CoEuiFileUpload(this.sectionById(id));
  }
  fileUploadFromSectionWithIdByIndex(sectionId, index) {
   return new CoEuiFileUpload(this.sectionById(sectionId)).byIndex(index);
  }
  filePreviewFromSection(id) {
    return new CoEuiFilePreview(this.fileUploadFromSectionById(id));
  }
}


