'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-a1121663.js');
require('./BaseField-f50bb8f0.js');
const date = require('./date-8e8ca89a.js');
const moment = require('./moment-d48a0164.js');

const dvnFieldDisplayCellDateCss = ".sc-dvn-field-display-cell-date-h{display:block;padding:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";

const DvnFieldDisplayCellDate = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
  }
  render() {
    let date$1 = this.value;
    if (this.field.dateDataType === date.DateDataType.ISO) {
      date$1 = new Date(this.value);
    }
    else if (this.field.dateDataType === date.DateDataType.Unix) {
      date$1 = new Date(this.value * 1000);
    }
    return (index.h(index.Host, null, this.value ? moment.hooks(date$1).format(this.field.dateFormat) : ''));
  }
};
DvnFieldDisplayCellDate.style = dvnFieldDisplayCellDateCss;

exports.dvn_field_display_cell_date = DvnFieldDisplayCellDate;
