import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { ElementName } from '../../../../../constants';
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
import { BaseDateTimeElement, toDateTimeProps } from '../common';
var CreatedOnElement = function CreatedOnElement(props) {
  var context = useFlexibleUiContext();
  var data = context ? toDateTimeProps('created', context.createdOn) : null;
  return data ? /*#__PURE__*/React.createElement(BaseDateTimeElement, _extends({}, data, props, {
    name: ElementName.CreatedOn
  })) : null;
};
export default CreatedOnElement;