text: import "antd/es/space/style";
  import _Space from "antd/es/space";
  import React, { useContext } from 'react';
  import { DownOutlined } from '@ant-design/icons';
  import { useIntl } from '@ant-design/pro-provider';
  import { ConfigContext as AntdConfigContext } from 'antd/lib/config-provider';
  
  var defaultCollapseRender = function defaultCollapseRender(collapsed, _, intl) {
    if (collapsed) {
      return /*#__PURE__*/React.createElement(React.Fragment, null, intl.getMessage('tableForm.collapsed', '展开'), /*#__PURE__*/React.createElement(DownOutlined, {
        style: {
          marginLeft: '0.5em',
          transition: '0.3s all',
          transform: "rotate(".concat(collapsed ? 0 : 0.5, "turn)")
        }
      }));
    }
  
    return /*#__PURE__*/React.createElement(React.Fragment, null, intl.getMessage('tableForm.expand', '收起'), /*#__PURE__*/React.createElement(DownOutlined, {
      style: {
        marginLeft: '0.5em',
        transition: '0.3s all',
        transform: "rotate(".concat(collapsed ? 0 : 0.5, "turn)")
      }
    }));
  };
  /**
   * FormFooter 的组件，可以自动进行一些配置
   * @param props
   */
  
  
  var Actions = function Actions(props) {
    var setCollapsed = props.setCollapsed,
        _props$collapsed = props.collapsed,
        collapsed = _props$collapsed === void 0 ? false : _props$collapsed,
        _props$collapseRender = props.collapseRender,
        collapseRender = _props$collapseRender === void 0 ? defaultCollapseRender : _props$collapseRender,
        submitter = props.submitter,
        style = props.style;
  
    var _useContext = useContext(AntdConfigContext),
        getPrefixCls = _useContext.getPrefixCls;
  
    var intl = useIntl();
    return /*#__PURE__*/React.createElement(_Space, {
      style: style
    }, submitter, collapseRender !== false && /*#__PURE__*/React.createElement("a", {
      className: getPrefixCls('pro-form-collapse-button'),
      onClick: function onClick() {
        setCollapsed(!collapsed);
      }
    }, collapseRender(collapsed, props, intl)));
  };
  
  export default Actions;