import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { _objectWithoutProperties } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import React, { Children, cloneElement, isValidElement } from "react";
import classNames from "classnames";
import "./index.less";
//#region src/components/table/Actions/component/ButtonIcon/index.tsx
const _excluded = ["children", "isActive"];
const prefix = "pisell-lowcode-";
const ButtonIcon = (props) => {
	const { children, isActive } = props, others = _objectWithoutProperties(props, _excluded);
	return /* @__PURE__ */ React.createElement("div", _objectSpread2(_objectSpread2({}, others), {}, { className: classNames(`${prefix}action-btn-icon`, { [`${prefix}action-btn-icon-active`]: isActive }) }), Children.map(children, (child) => {
		if (isValidElement(child)) {
			var _child$props;
			return cloneElement(child, { style: _objectSpread2(_objectSpread2({}, ((_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.style) || {}), {}, { color: isActive ? "#53389E" : "inherit" }) });
		}
		return child;
	}));
};
//#endregion
export { ButtonIcon as default };
