require("../../_virtual/_rolldown/runtime.js");
const require_objectWithoutProperties = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_hoc = require("../../utils/hoc.js");
let react = require("react");
let antd = require("antd");
//#region src/components/radio/index.tsx
const _excluded = [
	"options",
	"direction",
	"optionType",
	"children"
];
const optionTypeMap = {
	default: antd.Radio,
	button: antd.Radio.Button
};
const defaultArr = [];
const Group = (props) => {
	const { options = defaultArr, direction, optionType, children } = props, others = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	const radios = (0, react.useMemo)(() => {
		const RadioCpt = optionTypeMap[optionType || "default"];
		return options.map((option) => {
			return /* @__PURE__ */ React.createElement(RadioCpt, {
				key: option === null || option === void 0 ? void 0 : option.value,
				value: option === null || option === void 0 ? void 0 : option.value,
				disabled: option === null || option === void 0 ? void 0 : option.disabled
			}, option === null || option === void 0 ? void 0 : option.label);
		});
	}, [options]);
	return /* @__PURE__ */ React.createElement(antd.Radio.Group, others, /* @__PURE__ */ React.createElement(antd.Space, { direction }, radios));
};
const Radio = require_hoc.withWrap(antd.Radio);
Radio.Group = Group;
//#endregion
exports.default = Radio;
