"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["15871"],{87906:function(t,e,a){a.a(t,async function(t,s){try{a.r(e),a.d(e,{HuiUpdateActionsCardFeatureEditor:function(){return f}});a(62953);var i=a(40445),o=a(96196),n=a(77845),c=a(22786),u=a(1087),l=a(52763),h=a(82286),r=a(24247),p=a(52494),d=t([l,p,r]);[l,p,r]=d.then?(await d)():d;let _,b=t=>t;class f extends o.WF{setConfig(t){this._config=t}get _stateObj(){var t,e;return null!==(t=this.context)&&void 0!==t&&t.entity_id?this.hass.states[null===(e=this.context)||void 0===e?void 0:e.entity_id]:void 0}render(){if(!this.hass||!this._config)return o.s6;const t=null!=this._stateObj&&(0,h.$)(this._stateObj,r.TY.BACKUP),e=this._schema(this.hass.localize,t),a=Object.assign({},this._config);return!this._config.backup&&t&&(a.backup=p.J),(0,o.qy)(_||(_=b` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .computeLabel="${0}" .computeHelper="${0}" @value-changed="${0}"></ha-form> `),this.hass,a,e,this._computeLabelCallback,this._computeHelperCallback,this._valueChanged)}_valueChanged(t){(0,u.r)(this,"config-changed",{config:t.detail.value})}constructor(...t){super(...t),this._schema=(0,c.A)((t,e)=>[{name:"backup",disabled:!e,selector:{select:{default:"no",mode:"dropdown",options:["ask","yes","no"].map(e=>({value:e,label:t(`ui.panel.lovelace.editor.features.types.update-actions.backup_options.${e}`)}))}}}]),this._computeLabelCallback=t=>"backup"===t.name?this.hass.localize(`ui.panel.lovelace.editor.features.types.update-actions.${t.name}`):"",this._computeHelperCallback=t=>{const e=null!=this._stateObj&&(0,h.$)(this._stateObj,r.TY.BACKUP);if("backup"===t.name)return e?void 0:this.hass.localize("ui.panel.lovelace.editor.features.types.update-actions.backup_not_supported")}}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"context",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_config",void 0),f=(0,i.Cg)([(0,n.EM)("hui-update-actions-card-feature-editor")],f),s()}catch(_){s(_)}})}}]);
//# sourceMappingURL=15871.ebb70e793c4c5443.js.map