import React, { useCallback, memo, useContext } from 'react';
import { ButtonColor, FuncType } from '../../button/enum';
import { Size } from '../../core/enum';
import Button from '../../button/Button';
import TableContext from '../TableContext';

var CustomizationColumnHeader = function CustomizationColumnHeader(props) {
  var onHeaderClick = props.onHeaderClick,
      customizedBtn = props.customizedBtn;
  var context = useContext(TableContext);
  var openCustomizationModal = useCallback(function () {
    return onHeaderClick(context);
  }, [context, onHeaderClick]);
  return /*#__PURE__*/React.createElement(Button, {
    color: customizedBtn ? ButtonColor.primary : ButtonColor["default"],
    funcType: FuncType.flat,
    size: Size.small,
    icon: customizedBtn ? "settings-o" : "predefine",
    onClick: openCustomizationModal
  });
};

CustomizationColumnHeader.displayName = 'CustomizationColumnHeader';
export default /*#__PURE__*/memo(CustomizationColumnHeader);
//# sourceMappingURL=CustomizationColumnHeader.js.map
