import { _objectWithoutProperties } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import { withWrap } from "../../utils/hoc.js";
import { useMemo } from "react";
import { Radio, Space } from "antd";
//#region src/components/radio/index.tsx
const _excluded = [
	"options",
	"direction",
	"optionType",
	"children"
];
const optionTypeMap = {
	default: Radio,
	button: Radio.Button
};
const defaultArr = [];
const Group = (props) => {
	const { options = defaultArr, direction, optionType, children } = props, others = _objectWithoutProperties(props, _excluded);
	const radios = 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(Radio.Group, others, /* @__PURE__ */ React.createElement(Space, { direction }, radios));
};
const Radio$1 = withWrap(Radio);
Radio$1.Group = Group;
//#endregion
export { Radio$1 as default };
