import React from 'react';
import { connect } from "../../../redux";
import { Drawer } from '@whalecloud/fdx';
import { i18n } from '@fishx/i18n';
import FormRender from "../../../../render/components/FormRender";

var PreviewDrawer = function PreviewDrawer(_ref) {
  var visible = _ref.visible,
      setVisible = _ref.setVisible,
      reset = _ref.reset;

  var handleClose = function handleClose() {
    reset();
    setVisible(false);
  };

  return /*#__PURE__*/React.createElement(Drawer, {
    title: i18n("PAGEBUIDER_SETTINGS_PREVIEW"),
    visible: visible,
    width: "100%",
    onClose: handleClose,
    destroyOnClose: true
  }, /*#__PURE__*/React.createElement(FormRender, {
    load: {}
  }));
};

var mapDispatchToProps = function mapDispatchToProps(dispatch) {
  return {
    reset: function reset(payload) {
      dispatch({
        type: 'appRender/reset',
        payload: payload
      });
    }
  };
};

export default connect(function (state) {
  return {};
}, mapDispatchToProps)(PreviewDrawer);
//# sourceMappingURL=PreviewDrawer.js.map