import React from "react";
import { connect } from "../../../redux";
import { IconButton } from "@webiny/ui/Button";
import { ReactComponent as SettingsIcon } from "@svgr/webpack!./icons/settings.svg";

var PageSettingsButton = function PageSettingsButton(_ref) {
  var togglePlugin = _ref.togglePlugin;
  return /*#__PURE__*/React.createElement(IconButton, {
    onClick: function onClick() {
      return togglePlugin({
        name: "pb-editor-page-settings-bar"
      });
    },
    icon: /*#__PURE__*/React.createElement(SettingsIcon, null)
  });
};

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

export default connect(null, mapDispatchToProps)(PageSettingsButton);
//# sourceMappingURL=PageSettingsButton.js.map