"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 _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
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"]
};