import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-e3f64949.js';
import { F as FileUploadRejectionReason } from './bal-file-upload.type-5bdf19ee.js';

function getDefaultExportFromCjs (x) {
	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}

function createCommonjsModule(fn, basedir, module) {
	return module = {
	  path: basedir,
	  exports: {},
	  require: function (path, base) {
    return commonjsRequire();
  }
	}, fn(module, module.exports), module.exports;
}

function commonjsRequire () {
	throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
}

var spec = createCommonjsModule(function (module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });
var si = { radix: 1e3, unit: ['b', 'kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb', 'Zb', 'Yb'] };
var iec = { radix: 1024, unit: ['b', 'Kib', 'Mib', 'Gib', 'Tib', 'Pib', 'Eib', 'Zib', 'Yib'] };
var jedec = { radix: 1024, unit: ['b', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb', 'Zb', 'Yb'] };
exports.SPECS = {
    si: si,
    iec: iec,
    jedec: jedec,
};

});

var lib = createCommonjsModule(function (module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });

/**
 * file size
 * @param bytes
 * @param fixed
 * @param spec
 */
function default_1(bytes, fixed, spec$1) {
    if (fixed === void 0) { fixed = 1; }
    bytes = Math.abs(bytes);
    var _a = spec.SPECS[spec$1] || spec.SPECS['jedec'], radix = _a.radix, unit = _a.unit;
    var loop = 0;
    // calculate
    while (bytes >= radix) {
        bytes /= radix;
        ++loop;
    }
    return bytes.toFixed(fixed) + " " + unit[loop];
}
exports.default = default_1;

});

const filesize = /*@__PURE__*/getDefaultExportFromCjs(lib);

const balFileUploadCss = "@-webkit-keyframes spinAround{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinAround{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.file.sc-bal-file-upload{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.file-cta.sc-bal-file-upload,.file-name.sc-bal-file-upload{-moz-appearance:none;-webkit-appearance:none;-ms-flex-align:center;align-items:center;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:none;box-shadow:none;display:-ms-inline-flexbox;display:inline-flex;font-size:0.9375rem;height:2.5em;-ms-flex-pack:start;justify-content:flex-start;line-height:1.5;padding-bottom:calc(0.5em - 1px);padding-left:calc(0.75em - 1px);padding-right:calc(0.75em - 1px);padding-top:calc(0.5em - 1px);position:relative;vertical-align:top}.file-cta.sc-bal-file-upload:focus,.file-name.sc-bal-file-upload:focus,.is-focused.file-cta.sc-bal-file-upload,.is-focused.file-name.sc-bal-file-upload,.file-cta.sc-bal-file-upload:active,.file-name.sc-bal-file-upload:active,.is-active.file-cta.sc-bal-file-upload,.is-active.file-name.sc-bal-file-upload{outline:none}[disabled].file-cta.sc-bal-file-upload,[disabled].file-name.sc-bal-file-upload,fieldset[disabled].sc-bal-file-upload .file-cta.sc-bal-file-upload,fieldset[disabled].sc-bal-file-upload .file-name.sc-bal-file-upload{cursor:not-allowed}.file.sc-bal-file-upload{-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;position:relative}.file.is-white.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#ffffff;border-color:transparent;color:#222222}.file.is-white.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload,.file.is-white.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#f9f9f9;border-color:transparent;color:#222222}.file.is-white.sc-bal-file-upload:focus .file-cta.sc-bal-file-upload,.file.is-white.is-focused.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-color:transparent;-webkit-box-shadow:0 0 0.5em rgba(255, 255, 255, 0.25);box-shadow:0 0 0.5em rgba(255, 255, 255, 0.25);color:#222222}.file.is-white.sc-bal-file-upload:active .file-cta.sc-bal-file-upload,.file.is-white.is-active.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#f2f2f2;border-color:transparent;color:#222222}.file.is-black.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#222222;border-color:transparent;color:#ffffff}.file.is-black.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload,.file.is-black.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#1c1c1c;border-color:transparent;color:#ffffff}.file.is-black.sc-bal-file-upload:focus .file-cta.sc-bal-file-upload,.file.is-black.is-focused.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-color:transparent;-webkit-box-shadow:0 0 0.5em rgba(34, 34, 34, 0.25);box-shadow:0 0 0.5em rgba(34, 34, 34, 0.25);color:#ffffff}.file.is-black.sc-bal-file-upload:active .file-cta.sc-bal-file-upload,.file.is-black.is-active.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#151515;border-color:transparent;color:#ffffff}.file.is-light.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#fafafa;border-color:transparent;color:rgba(0, 0, 0, 0.7)}.file.is-light.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload,.file.is-light.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#f4f4f4;border-color:transparent;color:rgba(0, 0, 0, 0.7)}.file.is-light.sc-bal-file-upload:focus .file-cta.sc-bal-file-upload,.file.is-light.is-focused.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-color:transparent;-webkit-box-shadow:0 0 0.5em rgba(250, 250, 250, 0.25);box-shadow:0 0 0.5em rgba(250, 250, 250, 0.25);color:rgba(0, 0, 0, 0.7)}.file.is-light.sc-bal-file-upload:active .file-cta.sc-bal-file-upload,.file.is-light.is-active.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#ededed;border-color:transparent;color:rgba(0, 0, 0, 0.7)}.file.is-dark.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#003399;border-color:transparent;color:#fff}.file.is-dark.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload,.file.is-dark.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#002f8c;border-color:transparent;color:#fff}.file.is-dark.sc-bal-file-upload:focus .file-cta.sc-bal-file-upload,.file.is-dark.is-focused.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-color:transparent;-webkit-box-shadow:0 0 0.5em rgba(0, 51, 153, 0.25);box-shadow:0 0 0.5em rgba(0, 51, 153, 0.25);color:#fff}.file.is-dark.sc-bal-file-upload:active .file-cta.sc-bal-file-upload,.file.is-dark.is-active.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#002b80;border-color:transparent;color:#fff}.file.is-primary.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#009ee7;border-color:transparent;color:#ffffff}.file.is-primary.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload,.file.is-primary.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#0095da;border-color:transparent;color:#ffffff}.file.is-primary.sc-bal-file-upload:focus .file-cta.sc-bal-file-upload,.file.is-primary.is-focused.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-color:transparent;-webkit-box-shadow:0 0 0.5em rgba(0, 158, 231, 0.25);box-shadow:0 0 0.5em rgba(0, 158, 231, 0.25);color:#ffffff}.file.is-primary.sc-bal-file-upload:active .file-cta.sc-bal-file-upload,.file.is-primary.is-active.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#008dce;border-color:transparent;color:#ffffff}.file.is-link.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#009ee7;border-color:transparent;color:#003399}.file.is-link.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload,.file.is-link.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#0095da;border-color:transparent;color:#003399}.file.is-link.sc-bal-file-upload:focus .file-cta.sc-bal-file-upload,.file.is-link.is-focused.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-color:transparent;-webkit-box-shadow:0 0 0.5em rgba(0, 158, 231, 0.25);box-shadow:0 0 0.5em rgba(0, 158, 231, 0.25);color:#003399}.file.is-link.sc-bal-file-upload:active .file-cta.sc-bal-file-upload,.file.is-link.is-active.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#008dce;border-color:transparent;color:#003399}.file.is-info.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#003399;border-color:transparent;color:#fff}.file.is-info.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload,.file.is-info.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#002f8c;border-color:transparent;color:#fff}.file.is-info.sc-bal-file-upload:focus .file-cta.sc-bal-file-upload,.file.is-info.is-focused.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-color:transparent;-webkit-box-shadow:0 0 0.5em rgba(0, 51, 153, 0.25);box-shadow:0 0 0.5em rgba(0, 51, 153, 0.25);color:#fff}.file.is-info.sc-bal-file-upload:active .file-cta.sc-bal-file-upload,.file.is-info.is-active.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#002b80;border-color:transparent;color:#fff}.file.is-success.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#3fc889;border-color:transparent;color:#ffffff}.file.is-success.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload,.file.is-success.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#38c383;border-color:transparent;color:#ffffff}.file.is-success.sc-bal-file-upload:focus .file-cta.sc-bal-file-upload,.file.is-success.is-focused.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-color:transparent;-webkit-box-shadow:0 0 0.5em rgba(63, 200, 137, 0.25);box-shadow:0 0 0.5em rgba(63, 200, 137, 0.25);color:#ffffff}.file.is-success.sc-bal-file-upload:active .file-cta.sc-bal-file-upload,.file.is-success.is-active.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#35b97c;border-color:transparent;color:#ffffff}.file.is-warning.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#ff9900;border-color:transparent;color:#fff}.file.is-warning.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload,.file.is-warning.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#f29100;border-color:transparent;color:#fff}.file.is-warning.sc-bal-file-upload:focus .file-cta.sc-bal-file-upload,.file.is-warning.is-focused.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-color:transparent;-webkit-box-shadow:0 0 0.5em rgba(255, 153, 0, 0.25);box-shadow:0 0 0.5em rgba(255, 153, 0, 0.25);color:#fff}.file.is-warning.sc-bal-file-upload:active .file-cta.sc-bal-file-upload,.file.is-warning.is-active.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#e68a00;border-color:transparent;color:#fff}.file.is-danger.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#ff3366;border-color:transparent;color:#fff}.file.is-danger.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload,.file.is-danger.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#ff265c;border-color:transparent;color:#fff}.file.is-danger.sc-bal-file-upload:focus .file-cta.sc-bal-file-upload,.file.is-danger.is-focused.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-color:transparent;-webkit-box-shadow:0 0 0.5em rgba(255, 51, 102, 0.25);box-shadow:0 0 0.5em rgba(255, 51, 102, 0.25);color:#fff}.file.is-danger.sc-bal-file-upload:active .file-cta.sc-bal-file-upload,.file.is-danger.is-active.sc-bal-file-upload .file-cta.sc-bal-file-upload{background-color:#ff1a53;border-color:transparent;color:#fff}.file.is-small.sc-bal-file-upload{font-size:0.8125rem}.file.is-medium.sc-bal-file-upload{font-size:1.125rem}.file.is-medium.sc-bal-file-upload .file-icon.sc-bal-file-upload .fa.sc-bal-file-upload{font-size:21px}.file.is-large.sc-bal-file-upload{font-size:1.375rem}.file.is-large.sc-bal-file-upload .file-icon.sc-bal-file-upload .fa.sc-bal-file-upload{font-size:28px}.file.has-name.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-bottom-right-radius:0;border-top-right-radius:0}.file.has-name.sc-bal-file-upload .file-name.sc-bal-file-upload{border-bottom-left-radius:0;border-top-left-radius:0}.file.has-name.is-empty.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-radius:4px}.file.has-name.is-empty.sc-bal-file-upload .file-name.sc-bal-file-upload{display:none}.file.is-boxed.sc-bal-file-upload .file-label.sc-bal-file-upload{-ms-flex-direction:column;flex-direction:column}.file.is-boxed.sc-bal-file-upload .file-cta.sc-bal-file-upload{-ms-flex-direction:column;flex-direction:column;height:auto;padding:1em 3em}.file.is-boxed.sc-bal-file-upload .file-name.sc-bal-file-upload{border-width:0 1px 1px}.file.is-boxed.sc-bal-file-upload .file-icon.sc-bal-file-upload{height:1.5em;width:1.5em}.file.is-boxed.sc-bal-file-upload .file-icon.sc-bal-file-upload .fa.sc-bal-file-upload{font-size:21px}.file.is-boxed.is-small.sc-bal-file-upload .file-icon.sc-bal-file-upload .fa.sc-bal-file-upload{font-size:14px}.file.is-boxed.is-medium.sc-bal-file-upload .file-icon.sc-bal-file-upload .fa.sc-bal-file-upload{font-size:28px}.file.is-boxed.is-large.sc-bal-file-upload .file-icon.sc-bal-file-upload .fa.sc-bal-file-upload{font-size:35px}.file.is-boxed.has-name.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-radius:4px 4px 0 0}.file.is-boxed.has-name.sc-bal-file-upload .file-name.sc-bal-file-upload{border-radius:0 0 4px 4px;border-width:0 1px 1px}.file.is-centered.sc-bal-file-upload{-ms-flex-pack:center;justify-content:center}.file.is-fullwidth.sc-bal-file-upload .file-label.sc-bal-file-upload{width:100%}.file.is-fullwidth.sc-bal-file-upload .file-name.sc-bal-file-upload{-ms-flex-positive:1;flex-grow:1;max-width:none}.file.is-right.sc-bal-file-upload{-ms-flex-pack:end;justify-content:flex-end}.file.is-right.sc-bal-file-upload .file-cta.sc-bal-file-upload{border-radius:0 4px 4px 0}.file.is-right.sc-bal-file-upload .file-name.sc-bal-file-upload{border-radius:4px 0 0 4px;border-width:1px 0 1px 1px;-ms-flex-order:-1;order:-1}.file-label.sc-bal-file-upload{-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-pack:start;justify-content:flex-start;overflow:hidden;position:relative}.file-label.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload{background-color:#f9f9f9;color:#003399}.file-label.sc-bal-file-upload:hover .file-name.sc-bal-file-upload{border-color:#cad4e7}.file-label.sc-bal-file-upload:active .file-cta.sc-bal-file-upload{background-color:#f2f2f2;color:#003399}.file-label.sc-bal-file-upload:active .file-name.sc-bal-file-upload{border-color:#c1cde3}.file-input.sc-bal-file-upload{height:100%;left:0;opacity:0;outline:none;position:absolute;top:0;width:100%}.file-cta.sc-bal-file-upload,.file-name.sc-bal-file-upload{border-color:#d3dbeb;border-radius:4px;font-size:1em;padding-left:1em;padding-right:1em;white-space:nowrap}.file-cta.sc-bal-file-upload{background-color:#ffffff;color:#222222}.file-name.sc-bal-file-upload{border-color:#d3dbeb;border-style:dashed;border-width:1px 1px 1px 0;display:block;max-width:16em;overflow:hidden;text-align:inherit;text-overflow:ellipsis}.file-icon.sc-bal-file-upload{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:1em;-ms-flex-pack:center;justify-content:center;margin-right:0.5em;width:1em}.file-icon.sc-bal-file-upload .fa.sc-bal-file-upload{font-size:14px}.sc-bal-file-upload-h{position:static;display:block}span.file-cta.sc-bal-file-upload,label.file-label.sc-bal-file-upload{-ms-flex:1;flex:1}span.file-cta.sc-bal-file-upload{height:90px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-style:dashed}.file-label.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload,.file-label.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload{background:#f0fbff;color:#003399}span.file-icon.sc-bal-file-upload bal-icon.sc-bal-file-upload{margin-right:6px;margin-top:6px}bal-list.sc-bal-file-upload{margin-top:15px}.file-remove.sc-bal-file-upload{cursor:pointer}label.file-label.is-disabled.sc-bal-file-upload{cursor:not-allowed}label.file-label.is-disabled.sc-bal-file-upload .file-cta.sc-bal-file-upload,label.file-label.is-disabled.is-hovered.sc-bal-file-upload .file-cta.sc-bal-file-upload,label.file-label.is-disabled.sc-bal-file-upload:hover .file-cta.sc-bal-file-upload{background:#f0fbff;color:#222222}";

const FileUpload = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.balChangeEventEmitter = createEvent(this, "balChange", 7);
    this.balRejectedFileEventEmitter = createEvent(this, "balRejectedFile", 7);
    this.bundleSize = 0;
    this.isOver = false;
    this.files = [];
    /**
     * Label of the drop area.
     */
    this.label = 'Choose or drop a file...';
    /**
     * If `true` multiple file upload is possible.
     */
    this.multiple = true;
    /**
     * Accepted MIME-Types like `image/png,image/jpeg`.
     */
    this.accept = '';
    /**
     * Allowed number of files in the bundle.
     */
    this.maxFiles = undefined;
    /**
     * Allowed max file size in bytes.
     */
    this.maxFileSize = undefined;
    /**
     * Allowed max bundle size in bytes.
     */
    this.maxBundleSize = undefined;
  }
  dragenterHandler() {
    if (!this.disabled) {
      this.isOver = true;
    }
  }
  dragoverHandler() {
    if (!this.disabled) {
      this.isOver = true;
    }
  }
  dragleaveHandler() {
    if (!this.disabled) {
      this.isOver = false;
    }
  }
  dropHandler(event) {
    if (!this.disabled) {
      this.isOver = false;
      const dataTransfer = event.dataTransfer;
      if (event.dataTransfer) {
        this.handleFiles(dataTransfer.files);
      }
    }
  }
  handleFiles(files) {
    if (!this.disabled) {
      const list = [...this.files];
      for (let index = 0; index < files.length; index++) {
        const file = files.item(index);
        const rejectReasons = [];
        if (this.accept && this.accept.split(' ').join('').split(',').indexOf(file.type) === -1) {
          rejectReasons.push(FileUploadRejectionReason.BAD_EXTENSION);
        }
        if (this.maxFileSize && file.size > this.maxFileSize) {
          rejectReasons.push(FileUploadRejectionReason.FILE_TOO_BIG);
        }
        const transactionFileSizeSum = this.files.map(f => f.size).reduce((a, b) => a + b, 0);
        const bundleSize = file.size + transactionFileSizeSum;
        if (this.maxBundleSize && bundleSize > this.maxBundleSize) {
          rejectReasons.push(FileUploadRejectionReason.FILE_SIZE_SUM_TOO_BIG);
        }
        if (this.maxFiles && list.length + 1 > this.maxFiles) {
          rejectReasons.push(FileUploadRejectionReason.TOO_MANY_FILES);
        }
        const duplicatedFiles = list.filter(f => f.size === file.size && f.name === file.name && f.type === file.type);
        if (duplicatedFiles.length > 0) {
          rejectReasons.push(FileUploadRejectionReason.DUPLICATED_FILE);
        }
        if (rejectReasons.length > 0) {
          this.balRejectedFileEventEmitter.emit({
            file: file,
            reasons: rejectReasons,
          });
        }
        else {
          list.push(file);
        }
      }
      this.files = [...list];
      this.balChangeEventEmitter.emit(this.files);
    }
  }
  componentDidLoad() {
    ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
      this.element.addEventListener(eventName, this.preventDefaults, false);
      document.body.addEventListener(eventName, this.preventDefaults, false);
    });
  }
  disconnectedCallback() {
    ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
      this.element.removeEventListener(eventName, this.preventDefaults, false);
      document.body.removeEventListener(eventName, this.preventDefaults, false);
    });
  }
  preventDefaults(e) {
    e.preventDefault();
    e.stopPropagation();
  }
  removeFile(indexToRemove) {
    if (!this.disabled) {
      const list = [];
      for (let index = 0; index < this.files.length; index++) {
        if (index !== indexToRemove) {
          list.push(this.files[index]);
        }
      }
      this.files = [...list];
      this.balChangeEventEmitter.emit(this.files);
    }
  }
  render() {
    return (h(Host, { class: ['bal-file-upload', this.disabled ? 'is-disabled' : ''].join(' ') }, h("div", { class: "file" }, h("label", { class: ['file-label', this.isOver ? 'is-hovered' : '', this.disabled ? 'is-disabled' : ''].join(' ') }, h("input", { class: "file-input", type: "file", name: "resume", multiple: this.multiple, disabled: this.disabled, accept: this.accept, onChange: () => this.handleFiles(this.fileInput.files), ref: el => (this.fileInput = el) }), h("span", { class: "file-cta" }, h("span", { class: "file-icon" }, h("bal-icon", { name: "upload", size: "medium" })), h("span", { class: "file-label" }, this.label)))), h("bal-list", { disabled: true, border: true }, this.files.map((file, index) => (h("bal-list-item", null, h("bal-list-item-icon", null, h("bal-icon", { size: "medium", name: "document" })), h("bal-list-item-content", null, h("bal-list-item-title", null, file.name), h("bal-list-item-subtitle", null, filesize(file.size))), h("bal-list-item-icon", { right: true, class: "file-remove", onClick: () => this.removeFile(index) }, h("bal-icon", { size: "medium", name: "trash" }))))))));
  }
  get element() { return getElement(this); }
};
FileUpload.style = balFileUploadCss;

export { FileUpload as bal_file_upload };
