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");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/components/div/index.tsx
const _excluded = [
	"baseClassName",
	"className",
	"render",
	"children",
	"style",
	"others"
];
const Div = (props) => {
	const { baseClassName = "div", className = "", render, children, style = {}, others = {} } = props, otherProps = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	const combinedClassName = (0, react.useMemo)(() => {
		const parts = [baseClassName, className].filter(Boolean);
		return parts.length > 0 ? parts.join(" ") : void 0;
	}, [baseClassName, className]);
	const content = (0, react.useMemo)(() => {
		if (render) try {
			return render();
		} catch (error) {
			console.error("Div render function error:", error);
			return children;
		}
		return children;
	}, [render, children]);
	const divProps = (0, react.useMemo)(() => require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, combinedClassName && { className: combinedClassName }), {}, { style }, others), otherProps), [
		combinedClassName,
		style,
		others,
		otherProps
	]);
	return /* @__PURE__ */ react.default.createElement("div", divProps, content);
};
Div.displayName = "Div";
var div_default = react.default.memo(Div);
//#endregion
exports.default = div_default;
