import Component from '../../component.js'
import MatCard from '../../material/mat-card.js'
import MatProgressBar from '../../material/mat-progress-bar.js'

export default class CoUxMFileUpload extends Component {
  constructor(parent) {
    let selector = 'ux-m-file-upload';
    super(parent, selector);
    // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/ux-file-upload/ux-m-file-upload/ux-m-file-upload.component.html
  }
  get matCardCO() {
    return new MatCard(this.currentPath);
  }
  get fileInfo() {
    let path = '//span[contains(@class, "file-info")]';
    return this.matCardCO.currentPath + path;
  }
  get section() {
    let path = '//section[contains(@class, "example-section")]';
    return this.matCardCO.currentPath + path;
  }
  get matProgressBarCO() {
    return new MatProgressBar(this.section);
  }
  get uxMFileUploadQueueDiv(){
    let path = '//div';
    return this.section + path;
  }
  get uploadFileIcon() {
    let path = '//span[contains(@class, "upload-file")]';
    return this.uxMFileUploadQueueDiv + path;
  }
  get removeFileIcon() {
    let path = '//span[contains(@class, "ux-icon-times")]';
    return this.uxMFileUploadQueueDiv + path;
  }
  get fileInfoProgressPerc() {
    let path = '//span[contains(@class, "file-info")][2]';
    return this.matCardCO.currentPath + path;
  }
}


