"use strict";

var _react = require("@storybook/react");

var _react2 = _interopRequireWildcard(require("react"));

var _Box = require("../Box");

var _Text = require("../Text");

var _Dropzone = require("./Dropzone");

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

var __jsx = _react2["default"].createElement;
var stories = (0, _react.storiesOf)('Dropzone', module);
stories.addDecorator(function (story) {
  return __jsx(_Box.Box, {
    maxWidth: "lg",
    mx: "auto",
    mt: 6,
    p: 6
  }, story());
});
stories.add('Default', function () {
  var _useState = (0, _react2.useState)(null),
      file = _useState[0],
      setFile = _useState[1];

  return __jsx(_Box.Box, null, __jsx(_Dropzone.Dropzone, {
    accept: ['.pdf', 'image/*'],
    dropEvent: function dropEvent(droppedFile) {
      return setFile(droppedFile);
    }
  }), file && __jsx(_Box.Box, null, __jsx(_Text.Text, null, "Selected File"), __jsx(_Text.Text, null, "File Name: ", file.name), __jsx(_Text.Text, null, "Last Modified: ", file.lastModified), __jsx(_Text.Text, null, "Size: ", file.size)));
});
//# sourceMappingURL=examples.js.map