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);
let antd = require("antd");
//#region src/components/eftpos/group/index.tsx
const _excluded = ["direction", "options"], _excluded2 = ["label", "value"], _excluded3 = ["direction", "options"], _excluded4 = ["label", "value"];
const CheckboxGroup = (_ref) => {
	let { direction, options } = _ref, props = require_objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
	if (direction === "vertical") return /* @__PURE__ */ react.default.createElement(antd.Checkbox.Group, props, /* @__PURE__ */ react.default.createElement(antd.Space, { direction }, options === null || options === void 0 ? void 0 : options.map((item) => {
		if (typeof item === "object") {
			const { label, value } = item, other = require_objectWithoutProperties._objectWithoutProperties(item, _excluded2);
			return /* @__PURE__ */ react.default.createElement(antd.Checkbox, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, other), {}, {
				value,
				key: `${item.value}`
			}), label);
		}
		return /* @__PURE__ */ react.default.createElement(antd.Checkbox, {
			value: item,
			key: `${item}`
		}, item);
	})));
	return /* @__PURE__ */ react.default.createElement(antd.Checkbox.Group, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, props), {}, { options }));
};
const RadioGroup = (_ref2) => {
	let { direction, options } = _ref2, props = require_objectWithoutProperties._objectWithoutProperties(_ref2, _excluded3);
	if (direction === "vertical") return /* @__PURE__ */ react.default.createElement(antd.Radio.Group, props, /* @__PURE__ */ react.default.createElement(antd.Space, { direction: "vertical" }, options === null || options === void 0 ? void 0 : options.map((item) => {
		if (typeof item === "object") {
			const { label, value } = item, other = require_objectWithoutProperties._objectWithoutProperties(item, _excluded4);
			return /* @__PURE__ */ react.default.createElement(antd.Radio, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, other), {}, {
				value,
				key: `${item.value}`
			}), label);
		}
		return /* @__PURE__ */ react.default.createElement(antd.Radio, {
			value: item,
			key: `${item}`
		}, item);
	})));
	return /* @__PURE__ */ react.default.createElement(antd.Radio.Group, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, props), {}, { options }));
};
//#endregion
exports.CheckboxGroup = CheckboxGroup;
exports.RadioGroup = RadioGroup;
