function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import * as React from 'react';
import classNames from 'classnames';
import { createUseStyles } from '@fluent-ui/styles';
import { styles } from '../Table.styled';
import { TableContext } from './TableContext';
const tableContext = {
  variant: 'head'
};
export const name = 'TableHead';
const useStyles = createUseStyles(styles, {
  name
});
const Head = React.forwardRef((props, ref) => {
  // eslint-disable-next-line react/prop-types
  const {
    className: classNameProp,
    ...rest
  } = props;
  const classes = useStyles(props);
  const className = classNames(classes.headRoot, classNameProp);
  return React.createElement(TableContext.Provider, {
    value: tableContext
  }, React.createElement("thead", _extends({
    className: className,
    ref: ref
  }, rest)));
});
Head.displayName = `F${name}`;
export default Head;