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 { useAmityElement, useTimeDifference } from '../../hooks';
import { ComponentID, ElementID, PageID } from '../../enums';
import { Typography } from '../../../core/components/Typography/Typography';
import { useStyles } from './styles';
function Timestamp({
  pageId = PageID.WildCardPage,
  elementId = ElementID.timestamp,
  componentId = ComponentID.WildCardComponent,
  timestamp,
  ...props
}) {
  const $timestamp = useTimeDifference(timestamp);
  const {
    accessibilityId,
    isExcluded,
    themeStyles
  } = useAmityElement({
    pageId,
    componentId,
    elementId
  });
  const {
    styles
  } = useStyles(themeStyles);
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(Typography.Caption, _extends({
    style: [styles.container, props.style],
    testID: accessibilityId
  }, props), $timestamp);
}
export default Timestamp;
//# sourceMappingURL=Timestamp.js.map