import React, { useCallback } from "react";
import { StyledChoiceLabel } from "./ChoiceItem.styled.js";
const ChoiceItem = (props) => {
    const { onChange } = props;
    const handleChange = useCallback((e) => {
        onChange(e.currentTarget.value);
    }, [onChange]);
    return (React.createElement(StyledChoiceLabel, { key: props.value.value, tabIndex: 0, className: props.className },
        React.createElement("input", { type: "radio", name: props.name, value: props.value.value, checked: props.active, onChange: handleChange }),
        React.createElement("span", null, props.value.label)));
};
ChoiceItem.toString = () => StyledChoiceLabel.toString();
export { ChoiceItem };
//# sourceMappingURL=ChoiceItem.js.map