import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { ElementName } from '../../../../../constants';
import { messages } from '../../../../../messages';
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
import { BaseTextElement, toFormattedTextProps } from '../common';
const CreatedByElement = props => {
  const context = useFlexibleUiContext();
  const data = context ? toFormattedTextProps(messages.created_by, context.createdBy) : null;
  return data ? /*#__PURE__*/React.createElement(BaseTextElement, _extends({}, data, props, {
    name: ElementName.CreatedBy
  })) : null;
};
export default CreatedByElement;