"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _hooks = require("../../hooks");
var _enums = require("../../enums");
var _Typography = require("../../../core/components/Typography/Typography");
var _styles = require("./styles");
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); }
function Timestamp({
  pageId = _enums.PageID.WildCardPage,
  elementId = _enums.ElementID.timestamp,
  componentId = _enums.ComponentID.WildCardComponent,
  timestamp,
  ...props
}) {
  const $timestamp = (0, _hooks.useTimeDifference)(timestamp);
  const {
    accessibilityId,
    isExcluded,
    themeStyles
  } = (0, _hooks.useAmityElement)({
    pageId,
    componentId,
    elementId
  });
  const {
    styles
  } = (0, _styles.useStyles)(themeStyles);
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(_Typography.Typography.Caption, _extends({
    style: [styles.container, props.style],
    testID: accessibilityId
  }, props), $timestamp);
}
var _default = exports.default = Timestamp;
//# sourceMappingURL=Timestamp.js.map