import React from 'react';
import { connect } from 'react-redux';
import Upload from 'antd/es/upload';
import 'antd/es/upload/style';
import Icon from 'antd/es/icon';
import 'antd/es/icon/style';
import { uploadStore } from '../../../../core/dataBus/actions';
import './index.less';
var Dragger = Upload.Dragger;

var StandalonePlaceholder = function StandalonePlaceholder(props) {
  var onUpload = props.onUpload;
  var uploaderProps = {
    beforeUpload: function beforeUpload(file) {
      onUpload(file);
      return false;
    },
    fileList: []
  };
  return React.createElement("div", {
    className: 'StandalonePlaceholder'
  }, React.createElement(Dragger, uploaderProps, React.createElement("p", {
    className: "ant-upload-drag-icon"
  }, React.createElement(Icon, {
    type: "inbox"
  })), React.createElement("p", {
    className: "ant-upload-text"
  }, "Click or drag `codecrumbs` json file to this area to upload"), React.createElement("p", {
    className: "ant-upload-hint"
  }, "All magic will happen automatically right after!")));
};

var mapDispatchToProps = {
  onUpload: uploadStore
};
export default connect(null, mapDispatchToProps)(StandalonePlaceholder);