import _objectSpread from "@babel/runtime/helpers/objectSpread2";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children", "tableStore", "dataSet"];
import React from 'react';
import { observer } from 'mobx-react-lite';
import { getContext, Symbols } from 'choerodon-ui/shared';
var TableContext = getContext(Symbols.ProTableContext, {
  tableStore: {},
  dataSet: {},
  indentSize: 15,
  rowHeight: 30
});

var TableContextProvider = function TableContextProvider(props) {
  var children = props.children,
      tableStore = props.tableStore,
      dataSet = props.dataSet,
      other = _objectWithoutProperties(props, _excluded);

  var value = _objectSpread(_objectSpread({}, other), {}, {
    dataSet: dataSet,
    tableStore: tableStore,
    border: tableStore.border,
    columnEditorBorder: tableStore.columnEditorBorder,
    rowHeight: tableStore.rowHeight,
    aggregation: tableStore.aggregation,
    inlineEdit: tableStore.inlineEdit,
    expandIconAsCell: tableStore.expandIconAsCell,
    canTreeLoadData: tableStore.canTreeLoadData,
    parityRow: tableStore.parityRow,
    checkField: dataSet.props.checkField
  });

  return /*#__PURE__*/React.createElement(TableContext.Provider, {
    value: value
  }, children);
};

TableContextProvider.displayName = 'TableContextProvider';
var ObserverTableContextProvider = observer(TableContextProvider);
export default TableContext;
export { ObserverTableContextProvider as TableContextProvider };
//# sourceMappingURL=TableContext.js.map
