"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.RadioButtonConditionalWrapper = void 0;
var _react = _interopRequireDefault(require("react"));
var _radioButton = require("./radio-button");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const RadioButtonConditionalWrapper = radioButtonProps => {
  const {
    wrapItems,
    ...otherRadioButtonProps
  } = radioButtonProps;
  if (wrapItems) {
    const testId = ['radiobutton-wrapper', radioButtonProps.groupIdentifier, radioButtonProps?.option?.id].filter(Boolean).join('-');
    return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      className: "block-wrapper",
      "test-id": testId,
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_radioButton.RadioButton, {
        ...otherRadioButtonProps
      })
    });
  }
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_radioButton.RadioButton, {
    ...otherRadioButtonProps
  });
};
exports.RadioButtonConditionalWrapper = RadioButtonConditionalWrapper;