text: define(["exports","../../../@polymer/polymer/polymer-element.js","../../vaadin-themable-mixin/vaadin-themable-mixin.js","../../vaadin-progress-bar/src/vaadin-progress-bar.js","./vaadin-upload-icons.js","../../../@polymer/polymer/lib/utils/html-tag.js"],function(_exports,_polymerElement,_vaadinThemableMixin,_vaadinProgressBar,_vaadinUploadIcons,_htmlTag){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.UploadFileElement=void 0;class UploadFileElement extends((0,_vaadinThemableMixin.ThemableMixin)(_polymerElement.PolymerElement)){static get template(){return _htmlTag.html`
      <style>
        :host {
          display: block;
        }
  
        [hidden] {
          display: none;
        }
      </style>
  
      <div part="row">
        <div part="info">
          <div part="done-icon" hidden\$="[[!file.complete]]"></div>
          <div part="warning-icon" hidden\$="[[!file.error]]"></div>
  
          <div part="meta">
            <div part="name" id="name">[[file.name]]</div>
            <div part="status" hidden\$="[[!file.status]]" id="status">[[file.status]]</div>
            <div part="error" id="error" hidden\$="[[!file.error]]">[[file.error]]</div>
          </div>
        </div>
        <div part="commands">
          <div part="start-button" file-event="file-start" on-click="_fireFileEvent" hidden\$="[[!file.held]]"></div>
          <div part="retry-button" file-event="file-retry" on-click="_fireFileEvent" hidden\$="[[!file.error]]"></div>
          <div part="clear-button" file-event="file-abort" on-click="_fireFileEvent"></div>
        </div>
      </div>
  
      <vaadin-progress-bar part="progress" id="progress" value\$="[[_formatProgressValue(file.progress)]]" error\$="[[file.error]]" indeterminate\$="[[file.indeterminate]]" uploading\$="[[file.uploading]]" complete\$="[[file.complete]]">
      </vaadin-progress-bar>
  `}static get is(){return"vaadin-upload-file"}static get properties(){return{file:Object}}static get observers(){return["_fileAborted(file.abort)",'_toggleHostAttribute(file.error, "error")','_toggleHostAttribute(file.indeterminate, "indeterminate")','_toggleHostAttribute(file.uploading, "uploading")','_toggleHostAttribute(file.complete, "complete")']}_fileAborted(abort){abort&&this._remove()}_remove(){this.dispatchEvent(new CustomEvent("file-remove",{detail:{file:this.file},bubbles:!0,composed:!0}))}_formatProgressValue(progress){return progress/100}_fireFileEvent(e){return e.preventDefault(),this.dispatchEvent(new CustomEvent(e.target.getAttribute("file-event"),{detail:{file:this.file},bubbles:!0,composed:!0}))}_toggleHostAttribute(value,attributeName){const shouldHave=Boolean(value);this.hasAttribute(attributeName)!==shouldHave&&(shouldHave?this.setAttribute(attributeName,""):this.removeAttribute(attributeName))}}_exports.UploadFileElement=UploadFileElement,customElements.define(UploadFileElement.is,UploadFileElement)});