import React from 'react';
import { Button, Form } from 'antd';
import { ReloadOutlined } from '@ant-design/icons';
import { PisellDataSourceContainer } from '@pisell/materials';
var useContainerContext = PisellDataSourceContainer.useContainerContext;
var Reset = function Reset(props) {
  var locales = props.locales,
    setValueType = props.setValueType,
    clearSelectedData = props.clearSelectedData;
  var _useContainerContext = useContainerContext(),
    list = _useContainerContext.serverActions.list;
  var form = Form.useFormInstance();
  return /*#__PURE__*/React.createElement(Button, {
    icon: /*#__PURE__*/React.createElement(ReloadOutlined, null),
    onClick: function onClick() {
      form.resetFields();
      list.onReset();
      setValueType(undefined);
      clearSelectedData();
    }
  }, locales.getText('pisell2.orderList.common.reset'));
};
export default Reset;