import{r as registerInstance,h,H as Host}from"./index-ecdfb761.js";import{h as hooks}from"./moment-65eca6b3.js";import{a as DateDataType}from"./date-1bc489bd.js";import"./BaseField-0b01dc2c.js";var dvnFieldDisplayDateCss=".sc-dvn-field-display-date-h{display:block;height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";var DvnFieldDisplayDate=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=hooks(e).tz(this.meta.timeZone).format(this.field.dateFormat)}else{t=hooks(e).format(this.field.dateFormat)}}return h(Host,null,t)};return e}();DvnFieldDisplayDate.style=dvnFieldDisplayDateCss;export{DvnFieldDisplayDate as dvn_field_display_date};