"use strict";

exports.__esModule = true;
exports["default"] = exports.RadioButtonDisabledAndChecked = exports.RadioButtonChecked = exports.ControlledRadioButtons = exports.BaseRadioButton = void 0;
var _react = _interopRequireWildcard(require("react"));
var _ = _interopRequireDefault(require("."));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
var BaseRadioButton = exports.BaseRadioButton = function BaseRadioButton() {
  return /*#__PURE__*/_react["default"].createElement(_["default"], {
    disabled: boolean("Disabled", false),
    onChange: function onChange() {},
    checked: boolean("Checked", false),
    label: text("Label", "Toggle field")
  });
};
var RadioButtonDisabledAndChecked = exports.RadioButtonDisabledAndChecked = function RadioButtonDisabledAndChecked() {
  return /*#__PURE__*/_react["default"].createElement(_["default"], {
    disabled: boolean("Disabled", true),
    onChange: function onChange() {},
    checked: boolean("Checked", true),
    label: text("Label", "Toggle field")
  });
};
var RadioButtonChecked = exports.RadioButtonChecked = function RadioButtonChecked() {
  return /*#__PURE__*/_react["default"].createElement(_["default"], {
    disabled: boolean("Disabled", false),
    onChange: function onChange() {},
    checked: boolean("Checked", true),
    label: text("Label", "Toggle field")
  });
};
var ControlledRadioButtons = exports.ControlledRadioButtons = function ControlledRadioButtons() {
  var _useState = (0, _react.useState)("radio1"),
    checked = _useState[0],
    setChecked = _useState[1];
  var handleChange = function handleChange(event) {
    return setChecked(event.target.value);
  };
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_["default"], {
    label: "Label 1",
    name: "radio-1",
    onChange: handleChange,
    value: "radio1",
    checked: checked === "radio1"
  }), /*#__PURE__*/_react["default"].createElement(_["default"], {
    label: "Label 2",
    name: "radio-1",
    onChange: handleChange,
    value: "radio2",
    checked: checked === "radio2"
  }), /*#__PURE__*/_react["default"].createElement(_["default"], {
    label: "Label 3",
    name: "radio-1",
    onChange: handleChange,
    value: "radio3",
    checked: checked === "radio3",
    disabled: true
  }), /*#__PURE__*/_react["default"].createElement("div", null, "The value: ", checked));
};
var _default = exports["default"] = {
  component: _["default"]
};