function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
import { Text } from 'react-native';
import { memo } from 'react';
import { ElementID } from '../../enums/enumUIKitID';
import useConfig from '../../hooks/useConfig';
import { useTimeDifference } from '../../hooks';
const TimeStampElement = ({
  pageID = '*',
  componentID = '*',
  createdAt,
  ...props
}) => {
  const {
    excludes
  } = useConfig();
  const elementID = ElementID.timestamp;
  const configId = `${pageID}/${componentID}/${elementID}`;
  const text = useTimeDifference(createdAt);
  if (excludes.includes(configId)) return null;
  return /*#__PURE__*/React.createElement(Text, _extends({
    testID: configId,
    accessibilityLabel: configId
  }, props), text);
};
export default /*#__PURE__*/memo(TimeStampElement);
//# sourceMappingURL=TimestampElement.js.map