'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { getTranslation } from '@payloadcms/translations';
import React from 'react';
import { useTranslation } from '../../providers/Translation/index.js';
import './index.scss';
const baseClass = 'field-description';
export const FieldDescription = (props)=>{
    const { className, description, marginPlacement, path } = props;
    const { i18n } = useTranslation();
    if (description) {
        return /*#__PURE__*/ _jsxDEV("div", {
            className: [
                baseClass,
                className,
                `field-description-${path?.replace(/\./g, '__')}`,
                marginPlacement && `${baseClass}--margin-${marginPlacement}`
            ].filter(Boolean).join(' '),
            children: getTranslation(description, i18n)
        }, void 0, false, {
            fileName: "src/fields/FieldDescription/index.tsx",
            lineNumber: 19,
            columnNumber: 7
        }, this);
    }
    return null;
};

//# sourceMappingURL=index.js.map