+
+
+ ${t
+
+ ${this.hass.localize(this._cardEditorEl||this._cardGUIMode?"ui.panel.lovelace.editor.edit_card.show_code_editor":"ui.panel.lovelace.editor.edit_card.show_visual_editor")}
+
+
+
+
+
+
+
+
+
+
+
+
+ `:U`
+
+ `}
+
+
+ `}static get styles(){return[n`
+ mwc-tab-bar {
+ border-bottom: 1px solid var(--divider-color);
+ }
+
+ .layout,
+ .cards #editor {
+ margin-top: 8px;
+ border: 1px solid var(--divider-color);
+ padding: 12px;
+ }
+
+ .cards .toolbar {
+ display: flex;
+ --paper-tabs-selection-bar-color: var(--primary-color);
+ --paper-tab-ink: var(--primary-color);
+ }
+ paper-tabs {
+ display: flex;
+ font-size: 14px;
+ flex-grow: 1;
+ }
+ #add-card {
+ max-width: 32px;
+ padding: 0;
+ }
+
+ .cards .card-options {
+ display: flex;
+ justify-content: flex-end;
+ width: 100%;
+ }
+ #editor {
+ border: 1px solid var(--divider-color);
+ padding: 12px;
+ }
+ .gui-mode-button {
+ margin-right: auto;
+ }
+
+ a {
+ color: var(--primary-color);
+ }
+ `]}}t([tt()],Pt.prototype,"_config",void 0),t([tt()],Pt.prototype,"lovelace",void 0),t([tt()],Pt.prototype,"hass",void 0),t([et()],Pt.prototype,"_selectedTab",void 0),t([et()],Pt.prototype,"_selectedCard",void 0),t([et()],Pt.prototype,"_cardGUIMode",void 0),t([et()],Pt.prototype,"_cardGUIModeAvailable",void 0),t([function(t,e){return(({finisher:t,descriptor:e})=>(i,o)=>{var s;if(void 0===o){const o=null!==(s=i.originalKey)&&void 0!==s?s:i.key,n=null!=e?{kind:"method",placement:"prototype",key:o,descriptor:e(i.key)}:{...i,key:o};return null!=t&&(n.finisher=function(e){t(e,o)}),n}{const s=i.constructor;void 0!==e&&Object.defineProperty(i,o,e(o)),null==t||t(s,o)}})({descriptor:i=>{const o={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;o.get=function(){var i,o;return void 0===this[e]&&(this[e]=null!==(o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==o?o:null),this[e]}}return o}})}("hui-card-element-editor")],Pt.prototype,"_cardEditorEl",void 0),customElements.define("layout-card-editor",Pt),customElements.whenDefined("hui-card-element-editor").then((()=>{const t=customElements.get("hui-card-element-editor"),e=t.prototype.getConfigElement;t.prototype.getConfigElement=async function(){const t=await e.bind(this)();if(t){const e=t.setConfig;t.setConfig=function(t){let i=JSON.parse(JSON.stringify(t));this._layoutData=i.view_layout,delete i.view_layout,e.bind(this)(i)}}return t};const i=t.prototype._handleUIConfigChanged;t.prototype._handleUIConfigChanged=function(t){this._configElement&&this._configElement._layoutData&&(t.detail.config.view_layout=this._configElement._layoutData),i.bind(this)(t)}})),customElements.whenDefined("hui-view-editor").then((()=>{const t=customElements.get("hui-view-editor"),e=t.prototype.firstUpdated;t.prototype.firstUpdated=function(){null==e||e.bind(this)(),this._oldSchema=this._schema,this._schema=t=>{const e=this._oldSchema(t),i=e[e.length-1];return"layout"===i.name||(i.selector.select.options.push(...Ut),e.push({name:"layout",selector:{object:{}}})),e};const t=document.createElement("p");t.innerHTML='\n You have layout-card installed which adds some options to this dialog.