import { jsxs, jsx } from 'react/jsx-runtime';
import React__default from 'react';
import { formLabelTheme } from './FormLabel.theme.js';
import { cn } from '../../../utils/cn.js';

/**
 * FormLabel component for providing consistent labeling for form elements
 */
const FormLabel = React__default.forwardRef(({ htmlFor, children, className, required = false, state = 'default', ...props }, ref) => {
    return (jsxs("label", { ref: ref, htmlFor: htmlFor, className: cn(formLabelTheme.baseStyle, formLabelTheme.stateStyles[state], className), ...props, children: [children, required && (jsx("span", { className: formLabelTheme.requiredIndicatorStyle, children: "*" }))] }));
});
FormLabel.displayName = "FormLabel";

export { FormLabel };
