import{LitElement as t,html as e,css as i}from"../../lit/index.js";import"./lib/date.format.js";class SimpleDatetime extends t{constructor(){super(),this.format="M jS, Y",this.unix=!1}static get styles(){return[i`
        :host {
          display: block;
        }
      `]}render(){return e` <time datetime="${this.date}">${this.date}</time> `}static get tag(){return"simple-datetime"}static get properties(){return{timestamp:{type:Number},format:{type:String},date:{type:String},unix:{type:Boolean}}}updated(t){t.forEach(((t,e)=>{["timestamp","format","unix"].includes(e)&&(this.date=this.formatDate(this.timestamp,this.format,this.unix))}))}formatDate(t,e,i){return i&&(t*=1e3),new Date(t).format(e)}}customElements.define(SimpleDatetime.tag,SimpleDatetime);export{SimpleDatetime};