(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["70133"],{34370:function(t,e,i){i(18111),i(7588),t.exports=function t(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(i){!e.hasOwnProperty(i)||null===e[i]||"object"!=typeof e[i]&&"function"!=typeof e[i]||Object.isFrozen(e[i])||t(e[i])}),e}},79316:function(t,e,i){"use strict";i.a(t,async function(t,o){try{i.r(e),i.d(e,{HuiDialogDeleteCard:function(){return v}});i(3362),i(62953);var a=i(40445),s=i(34370),n=i.n(s),r=i(96196),c=i(77845),l=i(1087),h=i(14503),d=i(46856),p=i(18350),u=(i(93444),i(72554)),g=t([d,p,u]);[d,p,u]=g.then?(await g)():g;let f,_,C,m=t=>t;class v extends r.WF{async showDialog(t){this._params=t,this._cardConfig=t.cardConfig,this._open=!0,Object.isFrozen(this._cardConfig)||(this._cardConfig=n()(this._cardConfig))}closeDialog(){this._open=!1}_dialogClosed(){this._open=!1,this._params=void 0,this._cardConfig=void 0,(0,l.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._params?(0,r.qy)(f||(f=m` <ha-dialog .hass="${0}" .open="${0}" header-title="${0}" @closed="${0}"> <div> ${0} </div> <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click="${0}" autofocus> ${0} </ha-button> <ha-button slot="primaryAction" class="warning" @click="${0}"> ${0} </ha-button> </ha-dialog-footer> </ha-dialog> `),this.hass,this._open,this.hass.localize("ui.panel.lovelace.cards.confirm_delete"),this._dialogClosed,this._cardConfig?(0,r.qy)(_||(_=m` <div class="element-preview"> <hui-card .hass="${0}" .config="${0}" preview></hui-card> </div> `),this.hass,this._cardConfig):"",this.closeDialog,this.hass.localize("ui.common.cancel"),this._delete,this.hass.localize("ui.common.delete")):r.s6}static get styles(){return[h.nA,(0,r.AH)(C||(C=m`.element-preview{position:relative}hui-card{margin:4px auto;max-width:500px;display:block;width:100%}`))]}_delete(){var t;null!==(t=this._params)&&void 0!==t&&t.deleteCard&&(this._params.deleteCard(),this.closeDialog())}constructor(...t){super(...t),this._open=!1}}(0,a.Cg)([(0,c.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,a.Cg)([(0,c.wk)()],v.prototype,"_params",void 0),(0,a.Cg)([(0,c.wk)()],v.prototype,"_open",void 0),(0,a.Cg)([(0,c.wk)()],v.prototype,"_cardConfig",void 0),v=(0,a.Cg)([(0,c.EM)("hui-dialog-delete-card")],v),o()}catch(f){o(f)}})}}]);
//# sourceMappingURL=70133.93b1effa6205e1e0.js.map