"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(require("react"));
var TutorialStyledComponents_1 = require("./TutorialStyledComponents");
exports.TutorialRadio = function (props) {
    var input;
    var onChange = props.onChange, children = props.children, value = props.value, name = props.name;
    var clickHandler = function () {
        input.checked = true;
        if (onChange) {
            onChange(name, input.value);
        }
    };
    return (React.createElement(TutorialStyledComponents_1.TutorialRadioBtnContain, null,
        React.createElement("input", { type: "radio", value: value, onChange: onChange, name: name, ref: function (ref) { return (input = ref); } }),
        React.createElement(TutorialStyledComponents_1.TutorialRadioBtn, { onClick: clickHandler },
            React.createElement(TutorialStyledComponents_1.TutorialRadioBtnCircle, null),
            children)));
};
//# sourceMappingURL=TutorialRadio.js.map