export const __rspack_esm_id="81767";export const __rspack_esm_ids=["81767"];export const __webpack_modules__={69690(t,i,e){e.a(t,async function(t,s){try{e.r(i);e(18111),e(61701);var a=e(62826),n=e(67868),h=e(96196),o=e(44457),r=e(19463),d=(e(50286),e(70491)),l=e(22675),c=e(37642),g=e(784),u=e(79757),_=e(85979),p=t([r,u]);[r,u]=p.then?(await p)():p;class f extends h.WF{setConfig(t){if(!t)throw new Error("Invalid configuration");this._config=t}shouldUpdate(t){return(0,g.LX)(this,t)}render(){if(!this._config||!this.hass)return h.s6;const t=this.hass.states[this._config.entity];if(!t)return h.qy` <hui-warning .hass="${this.hass}"> ${(0,_.j)(this.hass,this._config.entity)} </hui-warning> `;const i=t.state===l.Hh,e=(0,l.g0)(t.state)?void 0:new Date(t.state),s=e?(0,n.GP)(e,"HH:mm:ss"):void 0,a=e?(0,n.GP)(e,"yyyy-MM-dd"):void 0,o=(0,c.v)(this.hass,t,this._config.name);return h.qy` <hui-generic-entity-row .hass="${this.hass}" .config="${this._config}" hide-name> <div> <ha-date-input .label="${o}" .locale="${this.hass.locale}" .value="${a}" .disabled="${i}" @value-changed="${this._dateChanged}"> </ha-date-input> <ha-time-input .value="${s}" .disabled="${i}" .locale="${this.hass.locale}" @value-changed="${this._timeChanged}" @click="${this._stopEventPropagation}"></ha-time-input> </div> </hui-generic-entity-row> `}_stopEventPropagation(t){t.stopPropagation()}_timeChanged(t){if(t.detail.value){const i=this.hass.states[this._config.entity],e=new Date(i.state),s=t.detail.value.split(":").map(Number);e.setHours(s[0],s[1],s[2]),(0,d.P)(this.hass,i.entity_id,e)}}_dateChanged(t){if(t.detail.value){const i=this.hass.states[this._config.entity],e=new Date(i.state),s=t.detail.value.split("-").map(Number);e.setFullYear(s[0],s[1]-1,s[2]),(0,d.P)(this.hass,i.entity_id,e)}}}f.styles=h.AH`ha-time-input{margin-left:4px;margin-inline-start:4px;margin-inline-end:initial;direction:var(--direction)}div{display:flex;justify-content:flex-end;width:100%}`,(0,a.Cg)([(0,o.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,a.Cg)([(0,o.wk)()],f.prototype,"_config",void 0),f=(0,a.Cg)([(0,o.EM)("hui-datetime-entity-row")],f),s()}catch(t){s(t)}})}};
//# sourceMappingURL=81767.59ca1796eb700c7b.js.map