import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
export function fileToObject(file) {
  return _objectSpread(_objectSpread({}, file), {}, {
    lastModified: file.lastModified,
    lastModifiedDate: file.lastModifiedDate,
    name: file.name,
    size: file.size,
    type: file.type,
    uid: file.uid,
    percent: 0,
    originFileObj: file
  });
}
export function findItemFromList(file, fileList) {
  var targetKey = file.uid ? 'uid' : 'name';
  return fileList.find(function (item) {
    return item[targetKey] === file[targetKey];
  });
}