import{LocalizeController as t}from"./chunk.2A3352EO.js";import{ShoelaceElement as e}from"./chunk.Z7XDKKOD.js";import{__decorateClass as o}from"./chunk.6M63UXML.js";import{html as r}from"../../../../lit/index.js";import{property as i}from"../../../../lit/decorators.js";var a=class extends e{constructor(){super(...arguments),this.localize=new t(this),this.date=new Date,this.hourFormat="auto"}render(){const t=new Date(this.date),e="auto"===this.hourFormat?void 0:"12"===this.hourFormat;if(!isNaN(t.getMilliseconds()))return r`
      <time datetime=${t.toISOString()}>
        ${this.localize.date(t,{weekday:this.weekday,era:this.era,year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second,timeZoneName:this.timeZoneName,timeZone:this.timeZone,hour12:e})}
      </time>
    `}};o([i()],a.prototype,"date",2),o([i()],a.prototype,"weekday",2),o([i()],a.prototype,"era",2),o([i()],a.prototype,"year",2),o([i()],a.prototype,"month",2),o([i()],a.prototype,"day",2),o([i()],a.prototype,"hour",2),o([i()],a.prototype,"minute",2),o([i()],a.prototype,"second",2),o([i({attribute:"time-zone-name"})],a.prototype,"timeZoneName",2),o([i({attribute:"time-zone"})],a.prototype,"timeZone",2),o([i({attribute:"hour-format"})],a.prototype,"hourFormat",2);export{a as SlFormatDate};