"use strict";

var _react = _interopRequireDefault(require("react"));
var _react2 = require("@storybook/react");
var _index = _interopRequireDefault(require("./index"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var handleClick = function handleClick() {
  // eslint-disable-next-line no-console
  console.log(componentRef.current.validate());
};
var componentRef = /*#__PURE__*/_react["default"].createRef();
(0, _react2.storiesOf)('ReceiveOfferForm', module).add('with approval', function () {
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("button", {
    onClick: handleClick
  }, "validate"), /*#__PURE__*/_react["default"].createElement(_index["default"], {
    displayApproval: true,
    innerRef: componentRef
  }));
}).add('without approval', function () {
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("button", {
    onClick: handleClick
  }, "validate"), /*#__PURE__*/_react["default"].createElement(_index["default"], {
    displayApproval: false,
    innerRef: componentRef
  }));
});