"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RadioField = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const Radio_1 = require("../Radio");
const Tooltip_1 = require("../Tooltip");
const styles_1 = require("./styles");
/**
 * Составной компонент radio. Содержит label, tooltip и т.п.
 */
const RadioField = ({ id, disabled, label, isError, disabledReason, formControlLabelProps, ...restFieldProps }) => {
    return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: disabled && disabledReason, placement: "bottom-start", withoutContainer: false, children: (0, jsx_runtime_1.jsx)(styles_1.StyledFormControlLabel, { ...formControlLabelProps, label: label, control: (0, jsx_runtime_1.jsx)(Radio_1.Radio, { ...restFieldProps, isError: isError }), disabled: disabled }) }, id));
};
exports.RadioField = RadioField;
