'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';
export function isComponent(description) {
    return /*#__PURE__*/ React.isValidElement(description);
}
export function ViewDescription(props) {
    const { i18n } = useTranslation();
    const { description } = props;
    if (description) {
        return /*#__PURE__*/ _jsxDEV("div", {
            className: "custom-view-description",
            children: getTranslation(description, i18n)
        }, void 0, false, {
            fileName: "src/elements/ViewDescription/index.tsx",
            lineNumber: 22,
            columnNumber: 12
        }, this);
    }
    return null;
}

//# sourceMappingURL=index.js.map