UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

1 lines 2.36 kB
(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[70133],{34370:function(t,e,o){o(18111),o(7588),t.exports=function t(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(o){!e.hasOwnProperty(o)||null===e[o]||"object"!=typeof e[o]&&"function"!=typeof e[o]||Object.isFrozen(e[o])||t(e[o])}),e}},79316:function(t,e,o){"use strict";o.a(t,async function(t,i){try{o.r(e),o.d(e,{HuiDialogDeleteCard:function(){return v}});o(3362),o(62953);var a=o(40445),s=o(34370),n=o.n(s),r=o(5124),c=o(67576),l=o(1087),d=o(14503),h=o(46856),p=o(18350),u=(o(93444),o(72554)),g=t([h,p,u]);[h,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 .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._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[d.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),i()}catch(f){i(f)}})}}]);