import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { ICON_TYPES, EuiIcon, } from '../icon';
export const EuiTableHeaderButton = ({ children, className, iconType, ...rest }) => {
    const classes = classNames('euiTableHeaderButton', className);
    // Add an icon to the button if one exists.
    let buttonIcon;
    if (iconType) {
        buttonIcon = (React.createElement(EuiIcon, { className: "euiTableHeaderButton__icon", type: iconType, size: "m", "aria-hidden": "true" }));
    }
    return (React.createElement("button", Object.assign({ type: "button", className: classes }, rest),
        React.createElement("span", null, children),
        buttonIcon));
};
EuiTableHeaderButton.propTypes = {
    children: PropTypes.node,
    className: PropTypes.string,
    iconType: PropTypes.oneOf(ICON_TYPES),
};
//# sourceMappingURL=table_header_button.js.map