"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["45750"],{90005:function(e,a,t){t.r(a),t.d(a,{PanelView:function(){return _}});var i,r,o,d,s=t(72153),l=t(44734),n=t(43080),h=t(69683),c=t(6454),v=t(25460),u=(t(28706),t(23792),t(2892),t(26099),t(3362),t(47764),t(62953),t(40445)),p=t(96196),f=t(77845),g=t(94333),b=t(1087),y=t(15638),w=(t(38962),!1),_=function(e){function a(){var e;(0,l.A)(this,a);for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=(0,h.A)(this,a,[].concat(i))).isStrategy=!1,e.cards=[],e}return(0,c.A)(a,e),(0,n.A)(a,[{key:"setConfig",value:function(e){}},{key:"willUpdate",value:function(e){var i,r,o;if((0,v.A)(a,"willUpdate",this,3)([e]),null!==(i=this.lovelace)&&void 0!==i&&i.editMode&&!w&&(w=!0,Promise.all([t.e("34861"),t.e("59127")]).then(t.bind(t,70410))),e.has("cards")&&this._createCard(),e.has("lovelace")){var d=e.get("lovelace");(!e.has("cards")&&(null==d?void 0:d.config)!==(null===(r=this.lovelace)||void 0===r?void 0:r.config)||d&&(null==d?void 0:d.editMode)!==(null===(o=this.lovelace)||void 0===o?void 0:o.editMode))&&this._createCard()}}},{key:"render",value:function(){var e;return(0,p.qy)(i||(i=(0,s.A)([" "," "," "," "])),this.cards.length>1?(0,p.qy)(r||(r=(0,s.A)(['<ha-alert alert-type="warning">',"</ha-alert>"])),this.hass.localize("ui.panel.lovelace.editor.view.panel_mode.warning_multiple_cards")):"",this._card,null!==(e=this.lovelace)&&void 0!==e&&e.editMode&&0===this.cards.length?(0,p.qy)(o||(o=(0,s.A)([' <ha-fab .label="','" extended @click="','" class="','"> <ha-svg-icon slot="icon" .path="','"></ha-svg-icon> </ha-fab> '])),this.hass.localize("ui.panel.lovelace.editor.edit_card.add"),this._addCard,(0,g.H)({rtl:(0,y.qC)(this.hass)}),"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"):"")}},{key:"_addCard",value:function(){(0,b.r)(this,"ll-create-card")}},{key:"_createCard",value:function(){var e;if(0!==this.cards.length){var a=this.cards[0];if(a.layout="panel",this.isStrategy||null===(e=this.lovelace)||void 0===e||!e.editMode)return a.preview=!1,void(this._card=a);var t=document.createElement("hui-card-options");t.hass=this.hass,t.lovelace=this.lovelace,t.path=[this.index,0],t.hidePosition=!0,a.preview=!0,t.appendChild(a),this._card=t}else this._card=void 0}}])}(p.WF);_.styles=(0,p.AH)(d||(d=(0,s.A)([":host{display:block;height:100%;--restore-card-border-radius:var(\n        --ha-card-border-radius,\n        var(--ha-border-radius-lg)\n      );--restore-card-border-width:var(--ha-card-border-width, 1px);--restore-card-box-shadow:var(--ha-card-box-shadow, none)}*{--ha-card-border-radius:var(--ha-border-radius-square);--ha-card-border-width:0;--ha-card-box-shadow:none}ha-fab{position:fixed;right:calc(16px + var(--safe-area-inset-right));bottom:calc(16px + var(--safe-area-inset-bottom));z-index:1;float:var(--float-end);inset-inline-end:calc(16px + var(--safe-area-inset-right));inset-inline-start:initial}"]))),(0,u.Cg)([(0,f.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,u.Cg)([(0,f.MZ)({attribute:!1})],_.prototype,"lovelace",void 0),(0,u.Cg)([(0,f.MZ)({type:Number})],_.prototype,"index",void 0),(0,u.Cg)([(0,f.MZ)({attribute:!1})],_.prototype,"isStrategy",void 0),(0,u.Cg)([(0,f.MZ)({attribute:!1})],_.prototype,"cards",void 0),(0,u.Cg)([(0,f.wk)()],_.prototype,"_card",void 0),_=(0,u.Cg)([(0,f.EM)("hui-panel-view")],_)}}]);
//# sourceMappingURL=45750.237d89d4839f5c2c.js.map