UNPKG

iobroker.lovelace

Version:

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

6 lines 20.8 kB
/*! For license information please see 5851.a702a101a1b6c144.js.LICENSE.txt */ "use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["5851"],{97536:function(e,t,i){i.d(t,{W:()=>n});let o;const n=(0,i(57243).iv)(o||(o=(e=>e)`:host(:not([twoline])){height:56px}:host(:not([left])) .mdc-deprecated-list-item__meta{height:40px;width:40px}`))},99152:function(e,t,i){i.d(t,{V:()=>a});i(63721),i(71695),i(61893),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(47021);const o=Symbol("selection controller");class n{constructor(){this.selected=null,this.ordered=null,this.set=new Set}}class a{constructor(e){this.sets={},this.focusedSet=null,this.mouseIsDown=!1,this.updating=!1,e.addEventListener("keydown",(e=>{this.keyDownHandler(e)})),e.addEventListener("mousedown",(()=>{this.mousedownHandler()})),e.addEventListener("mouseup",(()=>{this.mouseupHandler()}))}static getController(e){const t=!("global"in e)||"global"in e&&e.global?document:e.getRootNode();let i=t[o];return void 0===i&&(i=new a(t),t[o]=i),i}keyDownHandler(e){const t=e.target;"checked"in t&&this.has(t)&&("ArrowRight"==e.key||"ArrowDown"==e.key?this.selectNext(t):"ArrowLeft"!=e.key&&"ArrowUp"!=e.key||this.selectPrevious(t))}mousedownHandler(){this.mouseIsDown=!0}mouseupHandler(){this.mouseIsDown=!1}has(e){return this.getSet(e.name).set.has(e)}selectPrevious(e){const t=this.getOrdered(e),i=t.indexOf(e),o=t[i-1]||t[t.length-1];return this.select(o),o}selectNext(e){const t=this.getOrdered(e),i=t.indexOf(e),o=t[i+1]||t[0];return this.select(o),o}select(e){e.click()}focus(e){if(this.mouseIsDown)return;const t=this.getSet(e.name),i=this.focusedSet;this.focusedSet=t,i!=t&&t.selected&&t.selected!=e&&t.selected.focus()}isAnySelected(e){const t=this.getSet(e.name);for(const i of t.set)if(i.checked)return!0;return!1}getOrdered(e){const t=this.getSet(e.name);return t.ordered||(t.ordered=Array.from(t.set),t.ordered.sort(((e,t)=>e.compareDocumentPosition(t)==Node.DOCUMENT_POSITION_PRECEDING?1:0))),t.ordered}getSet(e){return this.sets[e]||(this.sets[e]=new n),this.sets[e]}register(e){const t=e.name||e.getAttribute("name")||"",i=this.getSet(t);i.set.add(e),i.ordered=null}unregister(e){const t=this.getSet(e.name);t.set.delete(e),t.ordered=null,t.selected==e&&(t.selected=null)}update(e){if(this.updating)return;this.updating=!0;const t=this.getSet(e.name);if(e.checked){for(const i of t.set)i!=e&&(i.checked=!1);t.selected=e}if(this.isAnySelected(e))for(const i of t.set){if(void 0===i.formElementTabIndex)break;i.formElementTabIndex=i.checked?0:-1}this.updating=!1}}},49976:function(e,t,i){i.d(t,{U:()=>o});const o=e=>e.stopPropagation()},99426:function(e,t,i){i.r(t);var o=i(61701),n=(i(71695),i(47021),i(57243)),a=i(50778),s=i(35359),l=i(36522);i(23334),i(37583);let d,r,c,h,u=e=>e;const p={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};(0,o.Z)([(0,a.Mo)("ha-alert")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)()],key:"title",value(){return""}},{kind:"field",decorators:[(0,a.Cb)({attribute:"alert-type"})],key:"alertType",value(){return"info"}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"dismissable",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,n.dy)(d||(d=u` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,s.$)({[this.alertType]:!0}),this.title?"":"no-title",p[this.alertType],(0,s.$)({content:!0,narrow:this.narrow}),this.title?(0,n.dy)(r||(r=u`<div class="title">${0}</div>`),this.title):n.Ld,this.dismissable?(0,n.dy)(c||(c=u`<ha-icon-button @click="${0}" label="Dismiss alert" .path="${0}"></ha-icon-button>`),this._dismissClicked,"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"):n.Ld)}},{kind:"method",key:"_dismissClicked",value:function(){(0,l.B)(this,"alert-dismissed-clicked")}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(h||(h=u`.issue-type{position:relative;padding:8px;display:flex}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:4px}.icon{z-index:1}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:0}.title{margin-top:2px;font-weight:700}.action ha-icon-button,.action mwc-button{--mdc-theme-primary:var(--primary-text-color);--mdc-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`))}}]}}),n.oi)},73729:function(e,t,i){i.d(t,{i:()=>v});var o=i(61701),n=i(72621),a=(i(22152),i(71695),i(47021),i(74966)),s=i(51408),l=i(57243),d=i(50778),r=i(76525);i(23334);let c,h,u,p=e=>e;const m=["button","ha-list-item"],v=(e,t)=>{var i;return(0,l.dy)(c||(c=p` <div class="header_title"> <ha-icon-button .label="${0}" .path="${0}" dialogAction="close" class="header_button"></ha-icon-button> <span>${0}</span> </div> `),null!==(i=null==e?void 0:e.localize("ui.common.close"))&&void 0!==i?i:"Close","M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",t)};(0,o.Z)([(0,d.Mo)("ha-dialog")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",key:r.gA,value:void 0},{kind:"method",key:"scrollToPos",value:function(e,t){var i;null===(i=this.contentElement)||void 0===i||i.scrollTo(e,t)}},{kind:"method",key:"renderHeading",value:function(){return(0,l.dy)(h||(h=p`<slot name="heading"> ${0} </slot>`),(0,n.Z)(i,"renderHeading",this,3)([]))}},{kind:"method",key:"firstUpdated",value:function(){var e;(0,n.Z)(i,"firstUpdated",this,3)([]),this.suppressDefaultPressSelector=[this.suppressDefaultPressSelector,m].join(", "),this._updateScrolledAttribute(),null===(e=this.contentElement)||void 0===e||e.addEventListener("scroll",this._onScroll,{passive:!0})}},{kind:"method",key:"disconnectedCallback",value:function(){(0,n.Z)(i,"disconnectedCallback",this,3)([]),this.contentElement.removeEventListener("scroll",this._onScroll)}},{kind:"field",key:"_onScroll",value(){return()=>{this._updateScrolledAttribute()}}},{kind:"method",key:"_updateScrolledAttribute",value:function(){this.contentElement&&this.toggleAttribute("scrolled",0!==this.contentElement.scrollTop)}},{kind:"field",static:!0,key:"styles",value(){return[s.W,(0,l.iv)(u||(u=p`:host([scrolled]) ::slotted(ha-dialog-header){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.mdc-dialog{--mdc-dialog-scroll-divider-color:var( --dialog-scroll-divider-color, var(--divider-color) );z-index:var(--dialog-z-index,8);-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));--mdc-dialog-box-shadow:var(--dialog-box-shadow, none);--mdc-typography-headline6-font-weight:400;--mdc-typography-headline6-font-size:1.574rem}.mdc-dialog__actions{justify-content:var(--justify-action-buttons,flex-end);padding-bottom:max(env(safe-area-inset-bottom),24px)}.mdc-dialog__actions span:first-child{flex:var(--secondary-action-button-flex,unset)}.mdc-dialog__actions span:nth-child(2){flex:var(--primary-action-button-flex,unset)}.mdc-dialog__container{align-items:var(--vertical-align-dialog,center)}.mdc-dialog__title{padding:24px 24px 0 24px}.mdc-dialog__title:has(span){padding:12px 12px 0}.mdc-dialog__actions{padding:12px 24px 12px 24px}.mdc-dialog__title::before{content:unset}.mdc-dialog .mdc-dialog__content{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,24px)}:host([hideactions]) .mdc-dialog .mdc-dialog__content{padding-bottom:max(var(--dialog-content-padding,24px),env(safe-area-inset-bottom))}.mdc-dialog .mdc-dialog__surface{position:var(--dialog-surface-position,relative);top:var(--dialog-surface-top);margin-top:var(--dialog-surface-margin-top);min-height:var(--mdc-dialog-min-height,auto);border-radius:var(--ha-dialog-border-radius,28px);-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);background:var(--ha-dialog-surface-background,var(--mdc-theme-surface,#fff))}:host([flexContent]) .mdc-dialog .mdc-dialog__content{display:flex;flex-direction:column}.header_title{display:flex;align-items:center;direction:var(--direction)}.header_title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;padding-left:4px}.header_button{text-decoration:none;color:inherit;inset-inline-start:initial;inset-inline-end:-12px;direction:var(--direction)}.dialog-actions{inset-inline-start:initial!important;inset-inline-end:0px!important;direction:var(--direction)}`))]}}]}}),a.M)},92824:function(e,t,i){var o=i(61701),n=i(72621),a=(i(71695),i(40251),i(47021),i(60930)),s=i(9714),l=i(57243),d=i(50778),r=i(22381),c=i(76320);i(23334);let h,u,p,m,v=e=>e;(0,o.Z)([(0,d.Mo)("ha-select")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Boolean,reflect:!0})],key:"clearable",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({attribute:"inline-arrow",type:Boolean})],key:"inlineArrow",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)()],key:"options",value:void 0},{kind:"method",key:"render",value:function(){return(0,l.dy)(h||(h=v` ${0} ${0} `),(0,n.Z)(i,"render",this,3)([]),this.clearable&&!this.required&&!this.disabled&&this.value?(0,l.dy)(u||(u=v`<ha-icon-button label="clear" @click="${0}" .path="${0}"></ha-icon-button>`),this._clearValue,"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"):l.Ld)}},{kind:"method",key:"renderLeadingIcon",value:function(){return this.icon?(0,l.dy)(p||(p=v`<span class="mdc-select__icon"><slot name="icon"></slot></span>`)):l.Ld}},{kind:"method",key:"connectedCallback",value:function(){(0,n.Z)(i,"connectedCallback",this,3)([]),window.addEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"firstUpdated",value:async function(){var e;((0,n.Z)(i,"firstUpdated",this,3)([]),this.inlineArrow)&&(null===(e=this.shadowRoot)||void 0===e||null===(e=e.querySelector(".mdc-select__selected-text-container"))||void 0===e||e.classList.add("inline-arrow"))}},{kind:"method",key:"updated",value:function(e){if((0,n.Z)(i,"updated",this,3)([e]),e.has("inlineArrow")){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".mdc-select__selected-text-container");this.inlineArrow?null==e||e.classList.add("inline-arrow"):null==e||e.classList.remove("inline-arrow")}e.get("options")&&(this.layoutOptions(),this.selectByValue(this.value))}},{kind:"method",key:"disconnectedCallback",value:function(){(0,n.Z)(i,"disconnectedCallback",this,3)([]),window.removeEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"_clearValue",value:function(){!this.disabled&&this.value&&(this.valueSetDirectly=!0,this.select(-1),this.mdcFoundation.handleChange())}},{kind:"field",key:"_translationsUpdated",value(){return(0,r.D)((async()=>{await(0,c.y)(),this.layoutOptions()}),500)}},{kind:"field",static:!0,key:"styles",value(){return[s.W,(0,l.iv)(m||(m=v`:host([clearable]){position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:var(--secondary-text-color)}.mdc-select__anchor{width:var(--ha-select-min-width,200px)}.mdc-select--filled .mdc-select__anchor{height:var(--ha-select-height,56px)}.mdc-select--filled .mdc-floating-label{inset-inline-start:12px;inset-inline-end:initial;direction:var(--direction)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{inset-inline-start:48px;inset-inline-end:initial;direction:var(--direction)}.mdc-select .mdc-select__anchor{padding-inline-start:12px;padding-inline-end:0px;direction:var(--direction)}.mdc-select__anchor .mdc-floating-label--float-above{transform-origin:var(--float-start)}.mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,0px)}:host([clearable]) .mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,12px)}ha-icon-button{position:absolute;top:10px;right:28px;--mdc-icon-button-size:36px;--mdc-icon-size:20px;color:var(--secondary-text-color);inset-inline-start:initial;inset-inline-end:28px;direction:var(--direction)}.inline-arrow{flex-grow:0}`))]}}]}}),a.K)},10571:function(e,t,i){function o(e){return"strategy"in e}i.d(t,{s:()=>o})},6649:function(e,t,i){i.d(t,{JR:()=>n,Y:()=>a,iM:()=>s,j2:()=>o});i(19423);const o=e=>e.callWS({type:"lovelace/dashboards/list"}),n=(e,t)=>e.callWS(Object.assign({type:"lovelace/dashboards/create"},t)),a=(e,t,i)=>e.callWS(Object.assign({type:"lovelace/dashboards/update",dashboard_id:t},i)),s=(e,t)=>e.callWS({type:"lovelace/dashboards/delete",dashboard_id:t})},67271:function(e,t,i){i.r(t),i.d(t,{HuiDialogSelectView:()=>Z});var o=i(61701),n=(i(71695),i(9359),i(70104),i(52924),i(40251),i(11740),i(47021),i(31622),i(2060),i(87319),i(9065)),a=i(50778),s=i(97536),l=i(46289),d=(i(22139),i(47711)),r=i(81577);i(99152);let c=class extends d.J{};c.styles=[r.W],c=(0,n.__decorate)([(0,a.Mo)("mwc-radio")],c);var h=i(57243),u=i(35359),p=i(20552),m=i(65703);let v,g,f,_=e=>e;class k extends m.K{constructor(){super(...arguments),this.left=!1,this.graphic="control",this._changeFromClick=!1}render(){const e={"mdc-deprecated-list-item__graphic":this.left,"mdc-deprecated-list-item__meta":!this.left},t=this.renderText(),i=this.graphic&&"control"!==this.graphic&&!this.left?this.renderGraphic():(0,h.dy)(v||(v=_``)),o=this.hasMeta&&this.left?this.renderMeta():(0,h.dy)(g||(g=_``)),n=this.renderRipple();return(0,h.dy)(f||(f=_` ${0} ${0} ${0} <mwc-radio global class="${0}" tabindex="${0}" name="${0}" .checked="${0}" ?disabled="${0}" @checked="${0}"> </mwc-radio> ${0} ${0}`),n,i,this.left?"":t,(0,u.$)(e),this.tabindex,(0,p.o)(null===this.group?void 0:this.group),this.selected,this.disabled,this.onChange,this.left?t:"",o)}onClick(){this._changeFromClick=!0,super.onClick()}async onChange(e){const t=e.target;this.selected===t.checked||(this._skipPropRequest=!0,this.selected=t.checked,await this.updateComplete,this._skipPropRequest=!1,this._changeFromClick||this.fireRequestSelected(this.selected,"interaction")),this._changeFromClick=!1}}(0,n.__decorate)([(0,a.IO)("slot")],k.prototype,"slotElement",void 0),(0,n.__decorate)([(0,a.IO)("mwc-radio")],k.prototype,"radioElement",void 0),(0,n.__decorate)([(0,a.Cb)({type:Boolean})],k.prototype,"left",void 0),(0,n.__decorate)([(0,a.Cb)({type:String,reflect:!0})],k.prototype,"graphic",void 0);let y=class extends k{};y.styles=[l.W,s.W],y=(0,n.__decorate)([(0,a.Mo)("mwc-radio-list-item")],y);var b=i(36522),w=i(49976),x=(i(99426),i(73729)),L=(i(65981),i(92824),i(48977)),$=i(6649),C=i(28008),S=i(10571);let A,M,D,V,H,I,P,E=e=>e,Z=(0,o.Z)([(0,a.Mo)("hui-dialog-select-view")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",key:"hass",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_params",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_dashboards",value(){return[]}},{kind:"field",decorators:[(0,a.SB)()],key:"_urlPath",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_config",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_selectedViewIdx",value(){return 0}},{kind:"method",key:"showDialog",value:function(e){this._config=e.lovelaceConfig,this._urlPath=e.urlPath,this._params=e,this._params.allowDashboardChange&&this._getDashboards()}},{kind:"method",key:"closeDialog",value:function(){this._params=void 0,(0,b.B)(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"render",value:function(){var e;return this._params?(0,h.dy)(A||(A=E` <ha-dialog open @closed="${0}" .heading="${0}"> ${0} ${0} <mwc-button slot="secondaryAction" @click="${0}" dialogInitialFocus> ${0} </mwc-button> <mwc-button slot="primaryAction" .disabled="${0}" @click="${0}"> ${0} </mwc-button> </ha-dialog> `),this.closeDialog,(0,x.i)(this.hass,this._params.header||this.hass.localize("ui.panel.lovelace.editor.select_view.header")),this._params.allowDashboardChange?(0,h.dy)(M||(M=E`<ha-select .label="${0}" .disabled="${0}" .value="${0}" @selected="${0}" @closed="${0}" fixedMenuPosition naturalMenuWidth dialogInitialFocus> <mwc-list-item value="lovelace" .disabled="${0}"> Default </mwc-list-item> ${0} </ha-select>`),this.hass.localize("ui.panel.lovelace.editor.select_view.dashboard_label"),!this._dashboards.length,this._urlPath||this.hass.defaultPanel,this._dashboardChanged,w.U,"yaml"===(null===(e=this.hass.panels.lovelace)||void 0===e||null===(e=e.config)||void 0===e?void 0:e.mode),this._dashboards.map((e=>(0,h.dy)(D||(D=E` <mwc-list-item .disabled="${0}" .value="${0}">${0}</mwc-list-item> `),"storage"!==e.mode,e.url_path,e.title)))):"",!this._config||(this._config.views||[]).length<1?(0,h.dy)(V||(V=E`<ha-alert alert-type="error">${0}</ha-alert>`),this.hass.localize(this._config?"ui.panel.lovelace.editor.select_view.no_views":"ui.panel.lovelace.editor.select_view.no_config")):this._config.views.length>1?(0,h.dy)(H||(H=E` <mwc-list dialogInitialFocus> ${0} </mwc-list> `),this._config.views.map(((e,t)=>{var i,o;const n=(0,S.s)(e);return(0,h.dy)(I||(I=E` <mwc-radio-list-item .graphic="${0}" @click="${0}" .value="${0}" .selected="${0}" .disabled="${0}"> <span> ${0}${0} </span> <ha-icon .icon="${0}" slot="graphic"></ha-icon> </mwc-radio-list-item> `),null!==(i=this._config)&&void 0!==i&&i.views.some((({icon:e})=>e))?"icon":h.Ld,this._viewChanged,t.toString(),this._selectedViewIdx===t,n&&!(null!==(o=this._params)&&void 0!==o&&o.includeStrategyViews),e.title,n?` (${this.hass.localize("ui.panel.lovelace.editor.select_view.strategy_type")})`:h.Ld,e.icon)}))):"",this.closeDialog,this.hass.localize("ui.common.cancel"),!this._config||(this._config.views||[]).length<1,this._selectView,this._params.actionLabel||this.hass.localize("ui.common.move")):h.Ld}},{kind:"method",key:"_getDashboards",value:async function(){this._dashboards=this._params.dashboards||await(0,$.j2)(this.hass)}},{kind:"method",key:"_dashboardChanged",value:async function(e){let t=e.target.value;if(t!==this._urlPath){"lovelace"===t&&(t=null),this._urlPath=t,this._selectedViewIdx=0;try{this._config=await(0,L.Q2)(this.hass.connection,t,!1)}catch(i){this._config=void 0}}}},{kind:"method",key:"_viewChanged",value:function(e){const t=Number(e.target.value);isNaN(t)||(this._selectedViewIdx=t)}},{kind:"method",key:"_selectView",value:function(){(0,b.B)(this,"view-selected",{view:this._selectedViewIdx}),this._params.viewSelectedCallback(this._urlPath,this._config,this._selectedViewIdx),this.closeDialog()}},{kind:"get",static:!0,key:"styles",value:function(){return[C.yu,(0,h.iv)(P||(P=E`ha-select{width:100%}mwc-radio-list-item{direction:ltr}`))]}}]}}),h.oi)}}]); //# sourceMappingURL=5851.a702a101a1b6c144.js.map