'use client';
import { getTranslation } from '@payloadcms/translations';
import React from 'react';
import { useTranslation } from '../../providers/Translation/index.js';
const Label = (props)=>{
    const { htmlFor, label, required = false } = props;
    const { i18n } = useTranslation();
    if (label) {
        return /*#__PURE__*/ React.createElement("label", {
            className: "field-label",
            htmlFor: htmlFor
        }, getTranslation(label, i18n), required && /*#__PURE__*/ React.createElement("span", {
            className: "required"
        }, "*"));
    }
    return null;
};
export default Label;

//# sourceMappingURL=index.js.map