import { t as Icon_default } from "./Icon.js";
import { t as Button_default } from "./Button.js";
import { t as ChevronDown_default } from "./ChevronDown.js";
import { t as ChevronUp_default } from "./ChevronUp.js";
import { n as ModeType } from "./constants3.js";
import { i as mapChildrenWithMode } from "./utils6.js";
import classNames from "classnames";
import { jsx, jsxs } from "react/jsx-runtime";
import styles from "./components/Table/styles.module.scss";
var TableExpanderCellMobile = ({ expanded, onClick, hideDetailsText, showDetailsText, mode = ModeType.normal }) => {
	return /* @__PURE__ */ jsx("td", {
		className: classNames(styles.table__cell, styles["table__expander-cell-mobile"], {
			[styles["table__expander-cell-mobile--expanded"]]: expanded,
			[styles["table__cell--compact"]]: mode === ModeType.compact
		}),
		children: /* @__PURE__ */ jsxs(Button_default, {
			"aria-expanded": expanded,
			variant: "borderless",
			onClick,
			children: [
				/* @__PURE__ */ jsx(Icon_default, { svgIcon: expanded ? ChevronUp_default : ChevronDown_default }),
				" ",
				expanded ? hideDetailsText : showDetailsText
			]
		})
	});
};
var TableExpanderCellMobile_default = TableExpanderCellMobile;
const TableRow = ({ rowKey, hideDetailsText, showDetailsText, expandable, expanded, onClick, className, children, mode = ModeType.normal, ...rest }) => {
	return /* @__PURE__ */ jsxs("tr", {
		className: classNames(styles["table-row"], { [styles["table__row--expandable"]]: expandable }, className),
		onClick,
		...rest,
		children: [mapChildrenWithMode(children, mode), expandable && /* @__PURE__ */ jsx(TableExpanderCellMobile_default, {
			expanded,
			onClick,
			hideDetailsText,
			showDetailsText,
			mode
		})]
	}, rowKey);
};
var TableRow_default$1 = TableRow;
export { TableRow as n, TableRow_default$1 as t };

//# sourceMappingURL=TableRow.js.map