"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormGroup = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("@chakra-ui/react");
const FormGroup = ({ children, label, error, helperText, isRequired, }) => {
    return ((0, jsx_runtime_1.jsxs)(react_1.FormControl, { isInvalid: !!error, isRequired: isRequired, children: [label && (0, jsx_runtime_1.jsx)(react_1.FormLabel, { children: label }), (0, jsx_runtime_1.jsx)(react_1.Box, { children: children }), error && (0, jsx_runtime_1.jsx)(react_1.FormErrorMessage, { children: error }), helperText && !error && ((0, jsx_runtime_1.jsx)(react_1.FormHelperText, { children: helperText }))] }));
};
exports.FormGroup = FormGroup;
exports.default = exports.FormGroup;
//# sourceMappingURL=FormGroup.js.map