export const ids=["317"];export const modules={20095:function(e,t,a){var i=a(44249),s=a(31622),o=a(57243),l=a(50778),n=a(22344);(0,i.Z)([(0,l.Mo)("ha-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[n.W,o.iv`::slotted([slot=icon]){margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction);display:block}.mdc-button{height:var(--button-height,36px)}.trailing-icon{display:flex}.slot-container{overflow:var(--button-slot-container-overflow,visible)}`]}]}}),s.z)},58202:function(e,t,a){a.r(t);var i=a(44249),s=a(57243),o=a(27486),l=a(50778),n=a(11297),d=a(44118),r=(a(42877),a(20095),a(66193));let c=(0,i.Z)(null,(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,l.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,l.SB)()],key:"_error",value:void 0},{kind:"field",decorators:[(0,l.SB)()],key:"_data",value:void 0},{kind:"field",decorators:[(0,l.SB)()],key:"_params",value:void 0},{kind:"field",key:"_expand",value:()=>!1},{kind:"field",key:"_schema",value:()=>(0,o.Z)((e=>[{name:"from",required:!0,selector:{time:{no_second:!0}}},{name:"to",required:!0,selector:{time:{no_second:!0}}},{name:"advanced_settings",type:"expandable",flatten:!0,expanded:e,schema:[{name:"data",required:!1,selector:{object:{}}}]}]))},{kind:"method",key:"showDialog",value:function(e){this._params=e,this._error=void 0,this._data=e.block,this._expand=!!e.block?.data}},{kind:"method",key:"closeDialog",value:function(){this._params=void 0,this._data=void 0,(0,n.B)(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"render",value:function(){return this._params&&this._data?s.dy` <ha-dialog open @closed="${this.closeDialog}" .heading="${(0,d.i)(this.hass,this.hass.localize("ui.dialogs.helper_settings.schedule.edit_schedule_block"))}"> <div> <ha-form .hass="${this.hass}" .schema="${this._schema(this._expand)}" .data="${this._data}" .error="${this._error}" .computeLabel="${this._computeLabelCallback}" @value-changed="${this._valueChanged}"></ha-form> </div> <ha-button slot="secondaryAction" class="warning" @click="${this._deleteBlock}"> ${this.hass.localize("ui.common.delete")} </ha-button> <ha-button slot="primaryAction" @click="${this._updateBlock}"> ${this.hass.localize("ui.common.save")} </ha-button> </ha-dialog> `:s.Ld}},{kind:"method",key:"_valueChanged",value:function(e){this._error=void 0,this._data=e.detail.value}},{kind:"method",key:"_updateBlock",value:function(){try{this._params.updateBlock(this._data),this.closeDialog()}catch(e){this._error={base:e?e.message:"Unknown error"}}}},{kind:"method",key:"_deleteBlock",value:function(){try{this._params.deleteBlock(),this.closeDialog()}catch(e){this._error={base:e?e.message:"Unknown error"}}}},{kind:"field",key:"_computeLabelCallback",value(){return e=>{switch(e.name){case"from":return this.hass.localize("ui.dialogs.helper_settings.schedule.start");case"to":return this.hass.localize("ui.dialogs.helper_settings.schedule.end");case"data":return this.hass.localize("ui.dialogs.helper_settings.schedule.data");case"advanced_settings":return this.hass.localize("ui.dialogs.helper_settings.schedule.advanced_settings")}return""}}},{kind:"get",static:!0,key:"styles",value:function(){return[r.yu]}}]}}),s.oi);customElements.define("dialog-schedule-block-info",c)}};
//# sourceMappingURL=317.2a8d0fcc9ae2bed7.js.map