"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.TableRow = void 0;
var _compat = require("preact/compat");
var _jsxRuntime = require("preact/compat/jsx-runtime");
const TableRow = _ref => {
  let {
    children,
    _isTableHeadChild,
    ...tableRowProps
  } = _ref;
  const renderChildren = () => {
    return _compat.Children.map(children, child => {
      // Extend props before rendering.
      if (child && child.props) {
        return (0, _compat.cloneElement)(child, {
          _isTableHeadChild: _isTableHeadChild
        });
      }
      return child;
    });
  };
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("tr", {
    role: "row",
    ...tableRowProps,
    children: _isTableHeadChild ? renderChildren() : children
  });
};
exports.TableRow = TableRow;
var _default = exports.default = TableRow;