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';
var ReadTimeElement = function ReadTimeElement(props) {
  var context = useFlexibleUiContext();
  var data = context ? toFormattedTextProps(messages.read_time, context.readTime) : null;
  return data ? /*#__PURE__*/React.createElement(BaseTextElement, _extends({}, data, props, {
    name: ElementName.ReadTime
  })) : null;
};
export default ReadTimeElement;