"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = timestampRender;
var _errorRender = _interopRequireDefault(require("./errorRender"));
var _defaultRender = _interopRequireDefault(require("./defaultRender"));
var _formatter = _interopRequireDefault(require("../formatter"));
function timestampRender(cellData, item) {
  if (!cellData) {
    return '';
  }
  if (isNaN(Number(cellData))) {
    return (0, _errorRender["default"])();
  }
  var timeFormatter = item.timeFormatter;
  var result = _formatter["default"].date(cellData, timeFormatter);
  return (0, _defaultRender["default"])(result);
}