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';
export const name = 'TableRow';
const useStyles = createUseStyles(styles, {
  name
});
const Row = React.forwardRef((props, ref) => {
  const tableContext = React.useContext(TableContext);
  const isBodyRow = tableContext.variant === 'body'; // eslint-disable-next-line react/prop-types

  const {
    className: classNameProp,
    ...rest
  } = props;
  const classes = useStyles(props);
  const className = classNames(classes.rowBody, {
    [classes.rowBody]: isBodyRow
  }, classNameProp);
  return React.createElement("tr", _extends({
    className: className,
    ref: ref
  }, rest));
});
Row.displayName = `F${name}`;
export default Row;