export const __rspack_esm_id=93037;export const __rspack_esm_ids=[93037];export const __webpack_modules__={83676(a,t,e){e.a(a,async function(a,r){try{e.r(t);var i=e(15697),s=e(57527),o=e(79224),d=e(97901),h=e(148),c=e(99517),l=e(88457),n=e(98747),p=a([l,n]);[l,n]=p.then?(await p)():p;const v="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z";let u=!1;class g extends s.WF{setConfig(a){}willUpdate(a){if(super.willUpdate(a),this.lovelace?.editMode&&!u&&(u=!0,e.e(14150).then(e.bind(e,58533))),a.has("cards")&&this._createCard(),!a.has("lovelace"))return;const t=a.get("lovelace");(!a.has("cards")&&t?.config!==this.lovelace?.config||t&&t?.editMode!==this.lovelace?.editMode)&&this._createCard()}render(){return s.qy` ${this.cards.length>1?s.qy`<ha-alert alert-type="warning">${this.hass.localize("ui.panel.lovelace.editor.view.panel_mode.warning_multiple_cards")}</ha-alert>`:""} ${this._card} ${this.lovelace?.editMode&&0===this.cards.length?s.qy` <ha-button size="l" @click=${this._addCard} class=${(0,d.H)({rtl:(0,c.qC)(this.hass.language,this.hass.translationMetadata.translations)})}> <ha-svg-icon slot="start" .path=${v}></ha-svg-icon> ${this.hass.localize("ui.panel.lovelace.editor.edit_card.add")} </ha-button> `:""} `}_addCard(){(0,h.r)(this,"ll-create-card")}_createCard(){if(0===this.cards.length)return void(this._card=void 0);const a=this.cards[0];if(a.layout="panel",this.isStrategy||!this.lovelace?.editMode)return a.preview=!1,void(this._card=a);const 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}constructor(...a){super(...a),this.isStrategy=!1,this.cards=[]}}g.styles=s.AH`:host{--restore-card-border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));--restore-card-border-width:var(--ha-card-border-width,1px);--restore-card-box-shadow:var(--ha-card-box-shadow,none);height:100%;display:block}*{--ha-card-border-radius:var(--ha-border-radius-square);--ha-card-border-width:0;--ha-card-box-shadow:none}ha-button{right:calc(16px + var(--safe-area-inset-right));bottom:calc(16px + var(--safe-area-inset-bottom));z-index:1;float:var(--float-end);--ha-button-box-shadow:var(--ha-box-shadow-l);position:fixed;inset-inline-start:initial;inset-inline-end:calc(16px + var(--safe-area-inset-right))}`,(0,i.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"lovelace",void 0),(0,i.Cg)([(0,o.MZ)({type:Number})],g.prototype,"index",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"isStrategy",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"cards",void 0),(0,i.Cg)([(0,o.wk)()],g.prototype,"_card",void 0),g=(0,i.Cg)([(0,o.EM)("hui-panel-view")],g),e.d(t,{PanelView:()=>g}),r()}catch(a){r(a)}})}};
//# sourceMappingURL=93037.f2564ac7b6afe408.js.map