import React, { useCallback } from 'react';
import { MTableToolbar } from '@material-table/core';
import { withStyles } from '@material-ui/core/styles';

const StyledMTableToolbar = withStyles(
  (theme) => ({
    root: {
      padding: theme.spacing(3, 0, 2.5, 2.5)
    },
    title: {
      "& > h6": {
        fontWeight: theme.typography.fontWeightBold
      }
    },
    searchField: {
      paddingRight: theme.spacing(2)
    }
  }),
  { name: "ResourceOptimizationTableToolbar" }
)(MTableToolbar);
function TableToolbar(toolbarProps) {
  const { toolbarRef, onSearchChanged } = toolbarProps;
  const handleSearchChanged = useCallback(
    (searchText) => {
      onSearchChanged(searchText);
    },
    [onSearchChanged]
  );
  return /* @__PURE__ */ React.createElement(
    StyledMTableToolbar,
    {
      ...toolbarProps,
      ref: toolbarRef,
      onSearchChanged: handleSearchChanged
    }
  );
}

export { TableToolbar };
//# sourceMappingURL=TableToolbar.esm.js.map
