export const __rspack_esm_id="45750";export const __rspack_esm_ids=["45750"];export const __webpack_modules__={90005(e,a,t){t.r(a),t.d(a,{PanelView:()=>h});var r=t(62826),i=t(96196),s=t(44457),d=t(94333),o=t(1087),l=t(15638);t(38962);let c=!1;class h extends i.WF{setConfig(e){}willUpdate(e){if(super.willUpdate(e),this.lovelace?.editMode&&!c&&(c=!0,Promise.all([t.e("34861"),t.e("59127")]).then(t.bind(t,70410))),e.has("cards")&&this._createCard(),!e.has("lovelace"))return;const a=e.get("lovelace");(!e.has("cards")&&a?.config!==this.lovelace?.config||a&&a?.editMode!==this.lovelace?.editMode)&&this._createCard()}render(){return i.qy` ${this.cards.length>1?i.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?i.qy` <ha-fab .label="${this.hass.localize("ui.panel.lovelace.editor.edit_card.add")}" extended @click="${this._addCard}" class="${(0,d.H)({rtl:(0,l.qC)(this.hass)})}"> <ha-svg-icon slot="icon" .path="${"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}"></ha-svg-icon> </ha-fab> `:""} `}_addCard(){(0,o.r)(this,"ll-create-card")}_createCard(){if(0===this.cards.length)return void(this._card=void 0);const e=this.cards[0];if(e.layout="panel",this.isStrategy||!this.lovelace?.editMode)return e.preview=!1,void(this._card=e);const a=document.createElement("hui-card-options");a.hass=this.hass,a.lovelace=this.lovelace,a.path=[this.index,0],a.hidePosition=!0,e.preview=!0,a.appendChild(e),this._card=a}constructor(...e){super(...e),this.isStrategy=!1,this.cards=[]}}h.styles=i.AH`:host{display:block;height:100%;--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)}*{--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,r.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,r.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"lovelace",void 0),(0,r.Cg)([(0,s.MZ)({type:Number})],h.prototype,"index",void 0),(0,r.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"isStrategy",void 0),(0,r.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"cards",void 0),(0,r.Cg)([(0,s.wk)()],h.prototype,"_card",void 0),h=(0,r.Cg)([(0,s.EM)("hui-panel-view")],h)}};
//# sourceMappingURL=45750.d48fd84f3eaff5b0.js.map