import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { _objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import React from "react";
import { Checkbox, Radio, Space } from "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 = _objectWithoutProperties(_ref, _excluded);
	if (direction === "vertical") return /* @__PURE__ */ React.createElement(Checkbox.Group, props, /* @__PURE__ */ React.createElement(Space, { direction }, options === null || options === void 0 ? void 0 : options.map((item) => {
		if (typeof item === "object") {
			const { label, value } = item, other = _objectWithoutProperties(item, _excluded2);
			return /* @__PURE__ */ React.createElement(Checkbox, _objectSpread2(_objectSpread2({}, other), {}, {
				value,
				key: `${item.value}`
			}), label);
		}
		return /* @__PURE__ */ React.createElement(Checkbox, {
			value: item,
			key: `${item}`
		}, item);
	})));
	return /* @__PURE__ */ React.createElement(Checkbox.Group, _objectSpread2(_objectSpread2({}, props), {}, { options }));
};
const RadioGroup = (_ref2) => {
	let { direction, options } = _ref2, props = _objectWithoutProperties(_ref2, _excluded3);
	if (direction === "vertical") return /* @__PURE__ */ React.createElement(Radio.Group, props, /* @__PURE__ */ React.createElement(Space, { direction: "vertical" }, options === null || options === void 0 ? void 0 : options.map((item) => {
		if (typeof item === "object") {
			const { label, value } = item, other = _objectWithoutProperties(item, _excluded4);
			return /* @__PURE__ */ React.createElement(Radio, _objectSpread2(_objectSpread2({}, other), {}, {
				value,
				key: `${item.value}`
			}), label);
		}
		return /* @__PURE__ */ React.createElement(Radio, {
			value: item,
			key: `${item}`
		}, item);
	})));
	return /* @__PURE__ */ React.createElement(Radio.Group, _objectSpread2(_objectSpread2({}, props), {}, { options }));
};
//#endregion
export { CheckboxGroup, RadioGroup };
