'use client';
import { getTranslation } from '@payloadcms/translations';
import React from 'react';
import { useTranslation } from '../../providers/Translation/index.js';
import { isComponent } from './types.js';
const ViewDescription = (props)=>{
    const { i18n } = useTranslation();
    const { description } = props;
    if (isComponent(description)) {
        const Description = description;
        return /*#__PURE__*/ React.createElement(Description, null);
    }
    if (description) {
        return /*#__PURE__*/ React.createElement("div", {
            className: "view-description"
        }, typeof description === 'function' ? description() : getTranslation(description, i18n));
    }
    return null;
};
export default ViewDescription;

//# sourceMappingURL=index.js.map