"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var _chunk6EBTM3SIcjs = require('./chunk-6EBTM3SI.cjs');


var _chunkZUAO4DW3cjs = require('./chunk-ZUAO4DW3.cjs');

// src/components/Radio.tsx
var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);
var _react = require('react');
var _jsxruntime = require('@emotion/react/jsx-runtime');
function Radio({
  radioOptions,
  onChange,
  defaultOption
}) {
  const [selectedOption, setSelectedOption] = _react.useState.call(void 0, defaultOption);
  const handleRadioClick = (e) => {
    onChange(e.target.value);
    setSelectedOption(e.target.value);
  };
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RadioContainer, { children: radioOptions.map((option) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, RadioRow, { htmlFor: option.label, children: [
    /* @__PURE__ */ _jsxruntime.jsx.call(void 0, 
      RadioInput,
      {
        id: option.label,
        type: "radio",
        value: option.label,
        checked: selectedOption === option.label,
        onChange: handleRadioClick
      }
    ),
    /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6EBTM3SIcjs.Label, { children: option.label })
  ] }, option.label)) });
}
var RadioContainer = _styled2.default.div`
  label: flex;
  flex-direction: column;
`;
var RadioRow = _styled2.default.label`
  display: flex;
  align-items: center;
  gap: ${_chunkZUAO4DW3cjs.Spacing.px.sm};
`;
var RadioInput = _styled2.default.input``;



exports.Radio = Radio;
