// @ts-nocheck
import { __assign, __rest } from "tslib";
import './FieldLabel.css';
import React from 'react';
import { cn } from '../../utils/bem';
import { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';
import { Typography } from '../Typography';
var cnFieldLabel = cn('FieldLabel');
export var FieldLabel = forwardRefWithAs(function (props, ref) {
    var className = props.className, required = props.required, children = props.children, otherProps = __rest(props, ["className", "required", "children"]);
    return (React.createElement(Typography.Text, __assign({}, otherProps, { view: "secondary", className: cnFieldLabel(null, [className]), ref: ref }),
        children,
        required && React.createElement("span", { className: cnFieldLabel('Star') }, "*")));
});
