iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
7 lines • 19.5 kB
JavaScript
export const __rspack_esm_id=62612;export const __rspack_esm_ids=[62612];export const __webpack_modules__={62647(t,e,a){var i=a(62826),o=a(9866),s=a(5124),n=a(22441);class l extends o.A{static get styles(){return[o.A.styles,s.AH`:host{font-size:var(--ha-font-size-m);--wa-color-brand-on-quiet:var(
--ha-tab-active-text-color,
var(--primary-color)
);--wa-color-neutral-on-quiet:var(--wa-color-brand-on-quiet);opacity:.8;color:inherit;--wa-space-l:16px}:host([active]:not([disabled])){opacity:1} (hover:hover){:host(:hover:not([disabled]):not([active])) .tab{color:var(--wa-color-brand-on-quiet)}}`]}}l=(0,i.Cg)([(0,n.EM)("ha-tab-group-tab")],l)},66289(t,e,a){a.a(t,async function(t,e){try{var i=a(62826),o=a(42814),s=a(5124),n=a(22441),l=a(36356),r=t([o]);o=(r.then?(await r)():r)[0];class c extends o.A{connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown,!0)}handleClick(t){this._dragScrollController.scrolled||super.handleClick(t)}static get styles(){return[o.A.styles,s.AH`:host{--track-width:2px;--track-color:var(--ha-tab-track-color, var(--divider-color));--indicator-color:var(
--ha-tab-indicator-color,
var(--primary-color)
);--wa-color-neutral-on-quiet:var(--indicator-color)}.tab-group-top ::slotted(ha-tab-group-tab[active]){border-block-end:solid var(--track-width) var(--indicator-color);margin-block-end:calc(-1 * var(--track-width))}.tab-group-start ::slotted(ha-tab-group-tab[active]){border-inline-end:solid var(--track-width) var(--indicator-color);margin-inline-end:calc(-1 * var(--track-width))}.tab-group-end ::slotted(ha-tab-group-tab[active]){border-inline-start:solid var(--track-width) var(--indicator-color);margin-inline-start:calc(-1 * var(--track-width))}.scroll-button::part(base):hover{background-color:transparent}`]}constructor(...t){super(...t),this._dragScrollController=new l.q(this,{selector:".nav"}),this.tabTag="ha-tab-group-tab",this.tabOnly=!0,this._handleKeyDown=t=>{(t.altKey||t.metaKey)&&t.stopPropagation()}}}(0,i.Cg)([(0,n.MZ)({attribute:"tab-tag"})],c.prototype,"tabTag",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"tab-only",type:Boolean})],c.prototype,"tabOnly",void 0),c=(0,i.Cg)([(0,n.EM)("ha-tab-group")],c),e()}catch(t){e(t)}})},83892(t,e,a){a.d(e,{x:()=>l});a(18111),a(13579);var i=a(62826),o=a(92070),s=a(5124),n=a(22441);class l extends s.WF{_onSlotChange(t){return e=>{const a=e.target.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&""!==t.textContent?.trim());"start"===t?this._hasStart=a:this._hasEnd=a}}render(){return this._renderBase(this._renderInner())}_renderBase(t){return s.qy`<div part="base" class="base" id="item">${t}</div>`}_renderInner(){const t=this._slotController.test("content");return s.qy` <div part="start" class="start" ?hidden="${!this._hasStart}"> <slot name="start" ="${this._onSlotChange("start")}"></slot> </div> <div part="content" class="content"> ${t?s.qy`<slot name="content"></slot>`:this._renderDefaultContent()} </div> <div part="end" class="end" ?hidden="${!this._hasEnd}"> <slot name="end" ="${this._onSlotChange("end")}"></slot> </div> `}_renderDefaultContent(){const t=this._slotController.test("headline"),e=this._slotController.test("supporting-text"),a=t||void 0!==this.headline,i=e||void 0!==this.supportingText;return s.qy` ${a?s.qy`<div part="headline" class="headline"> <slot name="headline">${this.headline??s.s6}</slot> </div>`:s.s6} ${i?s.qy`<div part="supporting-text" class="supporting"> <slot name="supporting-text">${this.supportingText??s.s6}</slot> </div>`:s.s6} `}constructor(...t){super(...t),this.disabled=!1,this._slotController=new o.X(this,"headline","supporting-text","content"),this._hasStart=!1,this._hasEnd=!1}}l.styles=s.AH`:host{display:block;color:var(--primary-text-color);font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal)}:host([disabled]){color:var(--disabled-text-color);pointer-events:none}.base{position:relative;display:flex;flex-direction:row;align-items:center;gap:var(--ha-row-item-gap,var(--ha-space-4));padding-block:var(--ha-row-item-padding-block,var(--ha-space-3));padding-inline:var(--ha-row-item-padding-inline,var(--ha-space-4));min-height:var(--ha-row-item-min-height,48px);box-sizing:border-box}.content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center}.end,.start{display:flex;align-items:center;flex:0 0 auto}.end[hidden],.start[hidden]{display:none}.headline{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.supporting{color:var(--secondary-text-color);font-size:var(--ha-font-size-s);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}`,(0,i.Cg)([(0,n.MZ)({type:String})],l.prototype,"headline",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"supporting-text"})],l.prototype,"supportingText",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],l.prototype,"disabled",void 0),(0,i.Cg)([(0,n.wk)()],l.prototype,"_hasStart",void 0),(0,i.Cg)([(0,n.wk)()],l.prototype,"_hasEnd",void 0),l=(0,i.Cg)([(0,n.EM)("ha-row-item")],l)},30461(t,e,a){a.a(t,async function(t,e){try{var i=a(62826),o=a(35211),s=a(5124),n=a(22441),l=a(87047),r=a(38962),c=(a(67094),a(83892)),h=a(14487),d=a(82747),p=t([r,h,l]);[r,h,l]=p.then?(await p)():p;const g={visible:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",hidden:"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z",invalid:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"};class v extends s.WF{willUpdate(t){super.willUpdate(t),(t.has("conditions")||t.has("hass"))&&this._listeners.setup(this.conditions??[],this.hass,()=>this._evaluate()),(t.has("hass")||t.has("conditions")||t.has("_entityContext"))&&this._evaluate()}render(){return s.qy` <ha-alert .alertType="${"visible"===this.state?"success":"hidden"===this.state?"warning":"error"}"> <ha-svg-icon slot="icon" .path="${g[this.state]}"></ha-svg-icon> <div class="headline"> ${this.hass?.localize(`ui.panel.lovelace.editor.condition-editor.visibility_status.${this.state}.headline`)} </div> <div class="supporting"> ${this.hass?.localize(`ui.panel.lovelace.editor.condition-editor.visibility_status.${this.state}.supporting${0===(this.conditions?.length??0)?"_empty":""}`)} </div> </ha-alert> `}_evaluate(){const t=this.conditions??[];let e;if(0===t.length)e="visible";else if((0,h.db)(t)){const a="current"===this._entityContext?.mode?{entity_id:this._entityContext.entityId}:{};e=(0,h.XH)(t,this.hass,a)?"visible":"hidden"}else e="invalid";e!==this.state&&(this.state=e)}constructor(...t){super(...t),this.conditions=[],this.state="visible",this._listeners=new l.x(this)}}v.styles=[c.x.styles,s.AH`ha-alert{display:block;--mdc-icon-size:24px}.headline{font-weight:var(--ha-font-weight-medium);margin-bottom:var(--ha-space-1)}`],(0,i.Cg)([(0,n.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],v.prototype,"conditions",void 0),(0,i.Cg)([(0,n.wk)(),(0,o.Fg)({context:d.$,subscribe:!0})],v.prototype,"_entityContext",void 0),(0,i.Cg)([(0,n.MZ)()],v.prototype,"state",void 0),v=(0,i.Cg)([(0,n.EM)("ha-visibility-status")],v),e()}catch(t){e(t)}})},70559(t,e,a){a.a(t,async function(t,i){try{a.r(e),a.d(e,{HuiDialogEditSection:()=>q});var o=a(62826),s=a(5124),n=a(22441),l=a(6412),r=a(1087),c=a(57237),h=a(18350),d=(a(76538),a(93444),a(72554)),p=a(29823),g=(a(70947),a(26300)),v=a(66289),u=(a(62647),a(10763)),_=a(35952),m=a(91984),b=a(65063),y=a(14503),C=a(82360),w=a(75196),f=a(85633),A=a(36457),$=a(19490),k=a(36751),x=a(49365),M=t([h,d,p,g,v,u,A,$]);[h,d,p,g,v,u,A,$]=M.then?(await M)():M;const L="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",H="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",z="M14 2H6C4.9 2 4 2.9 4 4V20C4 20.41 4.12 20.8 4.34 21.12C4.41 21.23 4.5 21.33 4.59 21.41C4.95 21.78 5.45 22 6 22H13.53C13 21.42 12.61 20.75 12.35 20H6V4H13V9H18V12C18.7 12 19.37 12.12 20 12.34V8L14 2M18 23L23 18.5L20 15.8L18 14V17H14V20H18V23Z",T="M3 6V8H14V6H3M3 10V12H14V10H3M20 10.1C19.9 10.1 19.7 10.2 19.6 10.3L18.6 11.3L20.7 13.4L21.7 12.4C21.9 12.2 21.9 11.8 21.7 11.6L20.4 10.3C20.3 10.2 20.2 10.1 20 10.1M18.1 11.9L12 17.9V20H14.1L20.2 13.9L18.1 11.9M3 14V16H10V14H3Z",Z=["tab-settings","tab-visibility"];class q extends s.WF{updated(t){if(this._yamlMode&&t.has("_yamlMode")){const t={...this._config};this._editor?.setValue(t)}}async showDialog(t){this._params=t,this._open=!0,this.lovelace=t.lovelace,this._config=(0,w.ys)(this._params.lovelaceConfig,[this._params.viewIndex,this._params.sectionIndex]),this._viewConfig=(0,w.ys)(this._params.lovelaceConfig,[this._params.viewIndex])}closeDialog(){return this._open=!1,!0}_dialogClosed(){this._params=void 0,this._yamlMode=!1,this._config=void 0,this._currTab=Z[0],(0,r.r)(this,"dialog-closed",{dialog:this.localName})}render(){if(!this._params||!this._config)return s.s6;const t=this.hass.localize("ui.panel.lovelace.editor.edit_section.header");let e=s.s6;if(this._yamlMode)e=s.qy` <ha-yaml-editor autofocus in-dialog -changed="${this._viewYamlChanged}"></ha-yaml-editor> `;else switch(this._currTab){case"tab-settings":e=s.qy` <hui-section-settings-editor .hass="${this.hass}" .config="${this._config}" .viewConfig="${this._viewConfig}" -changed="${this._configChanged}"> </hui-section-settings-editor> `;break;case"tab-visibility":e=s.qy` <hui-section-visibility-editor .hass="${this.hass}" .config="${this._config}" -changed="${this._configChanged}"> </hui-section-visibility-editor> `}return s.qy` <ha-dialog .open="${this._open}" prevent-scrim-close ="${this._ignoreKeydown}" ="${this._dialogClosed}" class="${(0,l.H)({"yaml-mode":this._yamlMode})}"> <ha-dialog-header show-border slot="header"> <ha-icon-button slot="navigationIcon" ="${this._cancel}" .label="${this.hass.localize("ui.common.close")}" .path="${L}"></ha-icon-button> <span slot="title">${t}</span> <ha-dropdown slot="actionItems" placement="bottom-end" ="${c.d}" -select="${this._handleAction}"> <ha-icon-button slot="trigger" .label="${this.hass.localize("ui.common.menu")}" .path="${H}"></ha-icon-button> <ha-dropdown-item value="toggle-yaml"> <ha-svg-icon slot="icon" .path="${T}"></ha-svg-icon> ${this.hass.localize("ui.panel.lovelace.editor.edit_view.edit_"+(this._yamlMode?"ui":"yaml"))} </ha-dropdown-item> <ha-dropdown-item value="move-to-view"> <ha-svg-icon slot="icon" .path="${z}"></ha-svg-icon> ${this.hass.localize("ui.panel.lovelace.editor.edit_view.move_to_view")} </ha-dropdown-item> </ha-dropdown> ${this._yamlMode?s.s6:s.qy` <ha-tab-group -tab-show="${this._handleTabChanged}"> ${Z.map(t=>s.qy` <ha-tab-group-tab slot="nav" .panel="${t}" .active="${this._currTab===t}"> ${this.hass.localize(`ui.panel.lovelace.editor.edit_section.${t.replace("-","_")}`)} </ha-tab-group-tab> `)} </ha-tab-group> `} </ha-dialog-header> ${e} <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" ="${this._cancel}"> ${this.hass.localize("ui.common.cancel")} </ha-button> <ha-button slot="primaryAction" ="${this._save}"> ${this.hass.localize("ui.common.save")} </ha-button> </ha-dialog-footer> </ha-dialog> `}_configChanged(t){t.stopPropagation(),this._config=t.detail.value}_handleTabChanged(t){const e=t.detail.name;e!==this._currTab&&(this._currTab=e)}async _handleAction(t){switch(t.detail.item.value){case"toggle-yaml":this._yamlMode=!this._yamlMode;break;case"move-to-view":this._openSelectView()}}_openSelectView(){this._params&&this.lovelace&&(0,f.X)(this,{lovelaceConfig:this._params.lovelaceConfig,urlPath:this.lovelace.urlPath,allowDashboardChange:!0,header:this.hass.localize("ui.panel.lovelace.editor.move_section.header"),viewSelectedCallback:this._moveSectionToView})}_viewYamlChanged(t){t.stopPropagation(),t.detail.isValid&&(this._config=t.detail.value)}_ignoreKeydown(t){t.stopPropagation()}_cancel(t){t&&t.stopPropagation(),this.closeDialog()}async _save(){if(!this._params||!this._config)return;const t=(0,w.uZ)(this._params.lovelaceConfig,[this._params.viewIndex,this._params.sectionIndex],this._config);this._params.saveConfig(t),this.closeDialog()}static get styles(){return[y.nA,y.kO,s.AH`ha-dialog{--dialog-content-padding:var(--ha-space-6)}ha-dialog.yaml-mode{--dialog-content-padding:0}ha-tab-group-tab{flex:1}ha-tab-group-tab::part(base){width:100%;justify-content:center}`]}constructor(...t){super(...t),this._yamlMode=!1,this._currTab=Z[0],this._open=!1,this._moveSectionToView=async(t,e,a)=>{if(!this._params||!this.lovelace)return;const i=e.views[a];if((0,m.R6)(i)||(0,k.E)(i)!==x._H)return void(0,b.showAlertDialog)(this,{title:this.hass.localize("ui.panel.lovelace.editor.move_section.error_title"),text:this.hass.localize("ui.panel.lovelace.editor.move_section.error_text"),warning:!0});const o=this._params.viewIndex,s=this._params.sectionIndex;if(t===this.lovelace.urlPath){const t=this.lovelace.config,e=i.sections?.length??0;try{await this.lovelace.saveConfig((0,C.hB)(t,[o,s],[a,e])),this.lovelace.showToast({message:this.hass.localize("ui.panel.lovelace.editor.move_section.success"),duration:4e3,action:{action:async()=>{await this.lovelace.saveConfig(t)},text:this.hass.localize("ui.common.undo")}}),this.closeDialog()}catch(t){this.lovelace.showToast({message:this.hass.localize("ui.panel.lovelace.editor.move_section.error")}),console.error(t)}return}const n=this.lovelace.config,l=e;try{const e=(0,w.ys)(n,[o,s]);await(0,_.ql)(this.hass,t,(0,C.Bn)(l,a,e)),await this.lovelace.saveConfig((0,C.tA)(n,o,s)),this.lovelace.showToast({message:this.hass.localize("ui.panel.lovelace.editor.move_section.success"),duration:4e3,action:{action:async()=>{await(0,_.ql)(this.hass,t,l),await this.lovelace.saveConfig(n)},text:this.hass.localize("ui.common.undo")}}),this.closeDialog()}catch(t){this.lovelace.showToast({message:this.hass.localize("ui.panel.lovelace.editor.move_section.error")}),console.error(t)}}}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],q.prototype,"hass",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],q.prototype,"lovelace",void 0),(0,o.Cg)([(0,n.wk)()],q.prototype,"_params",void 0),(0,o.Cg)([(0,n.wk)()],q.prototype,"_config",void 0),(0,o.Cg)([(0,n.wk)()],q.prototype,"_viewConfig",void 0),(0,o.Cg)([(0,n.wk)()],q.prototype,"_yamlMode",void 0),(0,o.Cg)([(0,n.wk)()],q.prototype,"_currTab",void 0),(0,o.Cg)([(0,n.wk)()],q.prototype,"_open",void 0),(0,o.Cg)([(0,n.P)("ha-yaml-editor")],q.prototype,"_editor",void 0),q=(0,o.Cg)([(0,n.EM)("hui-dialog-edit-section")],q),i()}catch(t){i(t)}})},36457(t,e,a){a.a(t,async function(t,e){try{var i=a(62826),o=a(5124),s=a(22441),n=a(22786),l=a(1087),r=a(52763),c=a(28918),h=t([r]);r=(h.then?(await h)():h)[0];const d="M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z";class p extends o.WF{render(){const t=void 0!==this.config.background,e=(0,c.o)(this.config.background),a={column_span:this.config.column_span||1,background_enabled:t,background_color:e?.color??"default",background_opacity:e?.opacity??50,theme:this.config.theme},i=this._schema(this.viewConfig.max_columns||4,t,this.hass.localize);return o.qy` <ha-form .hass="${this.hass}" .data="${a}" .schema="${i}" .computeLabel="${this._computeLabel}" .computeHelper="${this._computeHelper}" -changed="${this._valueChanged}"></ha-form> `}_valueChanged(t){t.stopPropagation();const e=t.detail.value,a={...this.config,column_span:e.column_span};if(e.background_enabled){const t=void 0!==e.background_color&&"default"!==e.background_color;a.background={...t?{color:e.background_color}:{},opacity:e.background_opacity}}else delete a.background;e.theme?a.theme=e.theme:delete a.theme,(0,l.r)(this,"value-changed",{value:a})}constructor(...t){super(...t),this._schema=(0,n.A)((t,e,a)=>[{name:"column_span",selector:{number:{min:1,max:t,slider_ticks:!0}}},{name:"background_enabled",selector:{boolean:{}}},...e?[{name:"background",type:"expandable",flatten:!0,expanded:!0,iconPath:d,schema:[{name:"background_color",selector:{ui_color:{extra_options:[{value:"default",label:a("ui.panel.lovelace.editor.edit_section.settings.background_color_default"),display_color:"var(--ha-section-background-color, var(--secondary-background-color))"}]}}},{name:"background_opacity",selector:{number:{min:0,max:100,step:1,unit_of_measurement:"%",mode:"slider"}}}]}]:[],{name:"theme",selector:{theme:{}}}]),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.edit_section.settings.${t.name}`),this._computeHelper=t=>this.hass.localize(`ui.panel.lovelace.editor.edit_section.settings.${t.name}_helper`)||""}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"config",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"viewConfig",void 0),p=(0,i.Cg)([(0,s.EM)("hui-section-settings-editor")],p),e()}catch(t){e(t)}})},19490(t,e,a){a.a(t,async function(t,e){try{var i=a(62826),o=a(5124),s=a(22441),n=a(1087),l=a(13898),r=a(30461),c=t([l,r]);[l,r]=c.then?(await c)():c;class h extends o.WF{render(){const t=this.config.visibility??[];return o.qy` <ha-visibility-status .hass="${this.hass}" .conditions="${t}"></ha-visibility-status> <ha-card-conditions-editor .hass="${this.hass}" .conditions="${t}" -changed="${this._valueChanged}"> </ha-card-conditions-editor> `}_valueChanged(t){t.stopPropagation();const e=t.detail.value,a={...this.config,visibility:e};0===a.visibility?.length&&delete a.visibility,(0,n.r)(this,"value-changed",{value:a})}}h.styles=o.AH`ha-visibility-status{margin-bottom:var(--ha-space-3)}`,(0,i.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"config",void 0),h=(0,i.Cg)([(0,s.EM)("hui-section-visibility-editor")],h),e()}catch(t){e(t)}})},85633(t,e,a){a.d(e,{X:()=>o});var i=a(1087);const o=(t,e)=>{(0,i.r)(t,"show-dialog",{dialogTag:"hui-dialog-select-view",dialogImport:()=>Promise.all([a.e(44335),a.e(40901)]).then(a.bind(a,54564)),dialogParams:e})}}};