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 { n as ModeType } from "./constants3.js";
import classNames from "classnames";
import React from "react";
import { jsx, jsxs } from "react/jsx-runtime";
import styles from "./components/Table/styles.module.scss";
const TableExpandedRow = ({ numberOfColumns, expanded, hideDetailsText, toggleClick, children, className, mode = ModeType.normal, id }) => {
	return /* @__PURE__ */ jsx("tr", {
		className: classNames(styles["table__expanded-row"], { [styles["table__expanded-row--expanded"]]: expanded }, className),
		id,
		children: /* @__PURE__ */ jsx("td", {
			colSpan: numberOfColumns,
			className: classNames(styles["table__cell"], className, { [styles["table__cell--compact"]]: mode === ModeType.compact }),
			children: /* @__PURE__ */ jsxs("div", {
				className: classNames(styles["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