"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[71257],{15466:function(e,t,a){a.a(e,async function(e,i){try{a.r(t);var o,s=a(28430),n=a(57567),r=a(25979),l=a(12463),p=a(16472),c=a(92297),h=a(15697),u=a(52621),d=a(57527),y=a(51209),_=e([u]),m=function(e){function t(){return(0,n.A)(this,t),(0,p.A)(this,t,arguments)}return(0,l.A)(t,e),(0,r.A)(t,[{key:"updated",value:function(e){if((0,c.A)(t,"updated",this,3)([e]),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}}],[{key:"styles",get:function(){return[u.A.styles,(0,d.AH)(o||(o=(0,s.A)([":host{--indicator-color:var(--ha-spinner-indicator-color,var(--primary-color));--track-color:var(--ha-spinner-divider-color,var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size,48px)}"])))]}}])}((u=(_.then?(await _)():_)[0]).A);(0,h.Cg)([(0,y.MZ)()],m.prototype,"size",void 0),m=(0,h.Cg)([(0,y.EM)("ha-spinner")],m),a.d(t,{HaSpinner:function(){return m}}),i()}catch(v){i(v)}})},73440:function(e,t,a){a.a(e,async function(e,i){try{a.r(t);var o,s,n,r,l=a(28430),p=a(57567),c=a(25979),h=a(12463),u=a(16472),d=(a(28706),a(15697)),y=a(57527),_=a(51209),m=a(148),v=a(73651),f=a(15466),g=a(88457),k=a(98747),A=(a(90507),a(76730)),z=e([v,f,g,k]);[v,f,g,k]=z.then?(await z)():z;var C=function(e){function t(){var e;(0,p.A)(this,t);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return(e=(0,u.A)(this,t,[].concat(i)))._opened=!1,e._saveComplete=!1,e}return(0,h.A)(t,e),(0,c.A)(t,[{key:"showDialog",value:function(e){var t=this;this._opened=!0,this._params=e,this._saveComplete=!1,this._params.savedPromise.then(function(){t._saveComplete=!0})}},{key:"closeDialog",value:function(){this._opened=!1}},{key:"_dialogClosed",value:function(){var e,t;return null===(e=(t=this._params).onClose)||void 0===e||e.call(t),this._opened&&(0,m.r)(this,"dialog-closed"),this._opened=!1,!0}},{key:"render",value:function(){var e=this.hass.localize("ui.panel.config.automation.editor.new_automation_setup_failed_title",{type:this.hass.localize("ui.panel.config.automation.editor.type_".concat(this._params.type))});return(0,y.qy)(o||(o=(0,l.A)([" <ha-dialog .open="," header-title="," @closed=",'> <div class="content"> '," <p></p> "," ",' </div> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" @click='," variant=","> "," </ha-button> </ha-dialog-footer> </ha-dialog> "])),this._opened,e,this._dialogClosed,this.hass.localize("ui.panel.config.automation.editor.new_automation_setup_failed_text",{type:this.hass.localize("ui.panel.config.automation.editor.type_".concat(this._params.type)),types:this.hass.localize("ui.panel.config.automation.editor.type_".concat(this._params.type,"_plural"))}),this.hass.localize("ui.panel.config.automation.editor.new_automation_setup_keep_waiting",{type:this.hass.localize("ui.panel.config.automation.editor.type_".concat(this._params.type))}),this._saveComplete?(0,y.qy)(s||(s=(0,l.A)(['<p></p> <ha-alert alert-type="success">',"</ha-alert>"])),this.hass.localize("ui.panel.config.automation.editor.new_automation_setup_timedout_success")):(0,y.qy)(n||(n=(0,l.A)(['<div class="loading"> <ha-spinner size="medium"> </ha-spinner> </div>']))),this._dialogClosed,this._saveComplete?"brand":"danger",this.hass.localize("ui.common.".concat(this._saveComplete?"ok":"cancel")))}}],[{key:"styles",get:function(){return[A.RF,A.nA,(0,y.AH)(r||(r=(0,l.A)([".loading{justify-content:center;display:flex}"])))]}}])}(y.WF);(0,d.Cg)([(0,_.MZ)({attribute:!1})],C.prototype,"hass",void 0),(0,d.Cg)([(0,_.wk)()],C.prototype,"_opened",void 0),(0,d.Cg)([(0,_.wk)()],C.prototype,"_saveComplete",void 0),C=(0,d.Cg)([(0,_.EM)("ha-dialog-automation-save-timeout")],C),i()}catch(w){i(w)}})}}]);
//# sourceMappingURL=71257.a163ef147dd48145.js.map