import{r as registerInstance,h,H as Host}from"./index-102043e0.js";import{m as momentTimezone}from"./index-3958847a.js";import{a as DateDataType}from"./date-ce777316.js";import"./_commonjsHelpers-27f122dd.js";import"./moment-6f6ab70c.js";import"./BaseField-461b6d0c.js";var dvnFieldDisplayCellDateCss=".sc-dvn-field-display-cell-date-h{display:block;padding:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";var DvnFieldDisplayCellDate=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){var e=this.value;if(this.field.dateDataType===DateDataType.ISO){e=new Date(this.value)}else if(this.field.dateDataType===DateDataType.Unix){e=new Date(this.value*1e3)}var t="";if(this.value){if(this.meta.timeZone){t=momentTimezone(e).tz(this.meta.timeZone).format(this.field.dateFormat)}else{t=momentTimezone(e).format(this.field.dateFormat)}}return h(Host,null,t)};return e}();DvnFieldDisplayCellDate.style=dvnFieldDisplayCellDateCss;export{DvnFieldDisplayCellDate as dvn_field_display_cell_date};