import { t as Icon_default } from "./Icon.js";
import { t as Button_default } from "./Button.js";
import { t as ChevronUp_default } from "./ChevronUp.js";
import { t as ModeType } from "./Table.js";
import React from "react";
import classNames from "classnames";
import { jsx, jsxs } from "react/jsx-runtime";
import tableStyles from "./components/Table/styles.module.scss";
const TableExpandedRow = ({ numberOfColumns, expanded, hideDetailsText, toggleClick, children, className, mode = ModeType.normal, id }) => {
	return /* @__PURE__ */ jsx("tr", {
		className: classNames(tableStyles["table__expanded-row"], { [tableStyles["table__expanded-row--expanded"]]: expanded }, className),
		id,
		children: /* @__PURE__ */ jsx("td", {
			colSpan: numberOfColumns,
			className: classNames(tableStyles["table__cell"], className, { [tableStyles["table__cell--compact"]]: mode === ModeType.compact }),
			children: /* @__PURE__ */ jsxs("div", {
				className: classNames(tableStyles["table__expanded-row-container"]),
				children: [React.Children.map(children, (child) => React.isValidElement(child) && React.cloneElement(child)), /* @__PURE__ */ jsxs(Button_default, {
					variant: "borderless",
					onClick: toggleClick,
					"aria-expanded": expanded,
					tabIndex: expanded ? 0 : -1,
					children: [hideDetailsText, /* @__PURE__ */ jsx(Icon_default, { svgIcon: ChevronUp_default })]
				})]
			})
		})
	});
};
var TableExpandedRow_default$1 = TableExpandedRow;
export { TableExpandedRow as n, TableExpandedRow_default$1 as t };

//# sourceMappingURL=TableExpandedRow.js.map