const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_objectWithoutProperties = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_usePisellConfig = require("../pisell-config-provider/hooks/usePisellConfig.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/components/pisellRow/index.tsx
const _excluded = [
	"platform",
	"gap",
	"padding",
	"style",
	"leftContent",
	"rightContent",
	"centerContent",
	"centerContentFill"
];
/**
* @title: Pisell Row
* @description:  左中右布局组件
* @param {PisellRowProps} props
* @return {*}
* @Author: zhiwei.Wang
* @Date: 2024-08-16 10:38
*/
const PisellRow = (props) => {
	require_usePisellConfig.default();
	const { platform = "h5", gap, padding, style, leftContent, rightContent, centerContent, centerContentFill } = props, rest = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	const _style = (0, react.useMemo)(() => {
		return require_objectSpread2._objectSpread2({
			padding: (0, _pisell_utils.isNumber)(padding) ? padding + "px" : padding,
			gap: (0, _pisell_utils.isNumber)(gap) ? gap + "px" : gap
		}, style);
	}, [
		style,
		padding,
		gap
	]);
	return /* @__PURE__ */ react.default.createElement("div", require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, rest), {}, {
		className: (0, classnames.default)("pisell-row", rest.className),
		style: _style
	}), leftContent && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-row-left" }, leftContent), /* @__PURE__ */ react.default.createElement("div", {
		className: "pisell-row-center",
		style: { flex: centerContentFill ? 1 : "unset" }
	}, centerContent), rightContent && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-row-right" }, rightContent));
};
//#endregion
exports.default = PisellRow;
