"use strict";

var _react = _interopRequireDefault(require("react"));

var _reactDom = _interopRequireDefault(require("react-dom"));

var _ = _interopRequireDefault(require(".."));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var defaultValue = [{
  uid: '0',
  name: 'IMG.png',
  state: 'done',
  url: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg',
  downloadURL: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg',
  imgURL: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg',
  size: 2000
}];

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement("div", {
  style: {
    background: '#f3f3f3',
    padding: '24px'
  }
}, /*#__PURE__*/_react["default"].createElement(_["default"], {
  listType: "image",
  action: "https://www.easy-mock.com/mock/5b713974309d0d7d107a74a3/alifd/upload" // accept="image/png, image/jpg, image/jpeg, image/gif, image/bmp"
  ,
  beforeUpload: beforeUpload,
  theme: "grey",
  onChange: onChange,
  defaultValue: defaultValue
}), /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement(_["default"], {
  action: "https://www.easy-mock.com/mock/5b713974309d0d7d107a74a3/alifd/upload",
  beforeUpload: beforeUpload,
  onChange: onChange,
  theme: "grey",
  listType: "text",
  defaultValue: defaultValue
}), /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement(_["default"].Dragger, {
  action: "http://118.31.33.81/docs/upload",
  listType: "text" // disabled
  ,
  theme: "grey",
  withCredentials: false // @ts-ignore
  ,
  onDrop: onDrop
}), /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement(_["default"].Card, {
  listType: "card",
  action: "https://www.easy-mock.com/mock/5b713974309d0d7d107a74a3/alifd/upload",
  accept: "image/png, image/jpg, image/jpeg, image/gif, image/bmp",
  onChange: onChange,
  useDataURL: true,
  theme: "grey" // disabled
  ,
  defaultValue: [{
    uid: '0',
    name: 'IMG.png',
    state: 'done',
    url: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg',
    downloadURL: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg',
    imgURL: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg'
  }, {
    uid: '1',
    name: 'IMG.png',
    state: 'done',
    url: 'https://img.alicdn.com/tfs/TB1x4QlgxYaK1RjSZFnXXa80pXa-1400-742.png',
    downloadURL: 'https://img.alicdn.com/tfs/TB1x4QlgxYaK1RjSZFnXXa80pXa-1400-742.png',
    imgURL: 'https://img.alicdn.com/tfs/TB1x4QlgxYaK1RjSZFnXXa80pXa-1400-742.png'
  }, {
    uid: '2',
    name: 'IMG.png',
    state: 'done',
    url: 'https://img.alicdn.com/tfs/TB1dcWosRjTBKNjSZFwXXcG4XXa-684-1000.png',
    downloadURL: 'https://img.alicdn.com/tfs/TB1dcWosRjTBKNjSZFwXXcG4XXa-684-1000.png',
    imgURL: 'https://img.alicdn.com/tfs/TB1dcWosRjTBKNjSZFwXXcG4XXa-684-1000.png'
  }, {
    uid: '3',
    name: 'IMG.png',
    percent: 50,
    state: 'uploading',
    url: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg',
    downloadURL: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg',
    imgURL: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg'
  }, {
    uid: '4',
    name: 'IMG.png',
    state: 'error',
    url: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg',
    downloadURL: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg',
    imgURL: 'https://img.alicdn.com/tps/TB19O79MVXXXXcZXVXXXXXXXXXX-1024-1024.jpg'
  }]
})), document.getElementById('upload-demo-19'));

function beforeUpload(info) {
  console.log('beforeUpload callback : ', info);
}

function onChange(info) {
  console.log('onChange callback : ', info);
}

function onDrop(fileList) {
  console.log('drop callback : ', fileList);
}