"use strict";
// @ts-nocheck
exports.__esModule = true;
exports.FieldLabel = void 0;
var tslib_1 = require("tslib");
require("./FieldLabel.css");
var react_1 = (0, tslib_1.__importDefault)(require("react"));
var bem_1 = require("../../utils/bem");
var PropsWithAsAttributes_1 = require("../../utils/types/PropsWithAsAttributes");
var Typography_1 = require("../Typography");
var cnFieldLabel = (0, bem_1.cn)('FieldLabel');
exports.FieldLabel = (0, PropsWithAsAttributes_1.forwardRefWithAs)(function (props, ref) {
    var className = props.className, required = props.required, children = props.children, otherProps = (0, tslib_1.__rest)(props, ["className", "required", "children"]);
    return (react_1["default"].createElement(Typography_1.Typography.Text, (0, tslib_1.__assign)({}, otherProps, { view: "secondary", className: cnFieldLabel(null, [className]), ref: ref }),
        children,
        required && react_1["default"].createElement("span", { className: cnFieldLabel('Star') }, "*")));
});
