import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import React, { forwardRef, useMemo } from "react";
import { Button } from "antd";
//#region src/components/button/index.tsx
const Button$1 = 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 = useMemo(() => {
		if (props.rightIcon) return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { style: { marginRight: 8 } }, " ", props.children), props.rightIcon);
		return props.children;
	}, [props.children, props.rightIcon]);
	return /* @__PURE__ */ React.createElement(Button, _objectSpread2(_objectSpread2(_objectSpread2({}, props), innerProps), {}, {
		ref,
		children: _children
	}));
});
//#endregion
export { Button$1 as default };
