const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
//#region src/components/button/index.tsx
const Button = (0, react.forwardRef)((props, ref) => {
	var _props$href;
	const innerProps = {};
	if (!((_props$href = props.href) === null || _props$href === void 0 ? void 0 : _props$href.trim()) || props.__designMode === "design") innerProps.href = void 0;
	const _children = (0, react.useMemo)(() => {
		if (props.rightIcon) return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement("span", { style: { marginRight: 8 } }, " ", props.children), props.rightIcon);
		return props.children;
	}, [props.children, props.rightIcon]);
	return /* @__PURE__ */ react.default.createElement(antd.Button, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, props), innerProps), {}, {
		ref,
		children: _children
	}));
});
//#endregion
exports.default = Button;
