export const __rspack_esm_id=19234;export const __rspack_esm_ids=[19234];export const __webpack_modules__={82272(e,a,t){t.a(e,async function(e,a){try{var s=t(15697),i=t(57527),p=t(79224),o=t(148),r=t(54939),n=t(57406),c=(t(62601),t(21696),e([r,n]));[r,n]=c.then?(await c)():c;const h=1;class u extends i.WF{render(){return i.qy` <ha-list-base> <ha-list-item-base> <span slot="headline"> ${this.hass.localize("ui.panel.config.backup.schedule.update_preference.label")} </span> <span slot="supporting-text"> ${this.hass.localize("ui.panel.config.backup.schedule.update_preference.supporting_text")} </span> <ha-select slot="end" @selected=${this._updatePreferenceChanged} .value=${this.supervisorUpdateConfig?.add_on_backup_before_update?.toString()||"false"} .options=${[{value:"false",label:this.hass.localize("ui.panel.config.backup.schedule.update_preference.skip_backups")},{value:"true",label:this.hass.localize("ui.panel.config.backup.schedule.update_preference.backup_before_update")}]}></ha-select> </ha-list-item-base> <ha-list-item-base> <span slot="headline"> ${this.hass.localize("ui.panel.config.backup.schedule.retention")} </span> <span slot="supporting-text"> ${this.hass.localize("ui.panel.config.backup.settings.app_update_backup.retention_description")} </span> <ha-input slot="end" @change=${this._backupRetentionChanged} .value=${this.supervisorUpdateConfig?.add_on_backup_retain_copies?.toString()||"1"} type="number" min=${h.toString()} step="1"> <span slot="end"> ${this.hass.localize("ui.panel.config.backup.schedule.retention_units.copies")} </span> </ha-input> </ha-list-item-base> </ha-list-base> `}_updatePreferenceChanged(e){e.stopPropagation();const a="true"===e.detail.value;(0,o.r)(this,"update-config-changed",{value:{add_on_backup_before_update:a}})}_backupRetentionChanged(e){const a=e.currentTarget,t=Number(a.value);t>=h&&(0,o.r)(this,"update-config-changed",{value:{add_on_backup_retain_copies:t}})}}u.styles=i.AH`ha-list-base{--ha-row-item-padding-inline:0}ha-list-item-base::part(headline),ha-list-item-base::part(supporting-text){white-space:wrap}ha-select{min-width:210px}ha-input{width:210px}@media (width<=450px){ha-select{width:160px;min-width:160px}ha-input{width:160px}}`,(0,s.Cg)([(0,p.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,s.Cg)([(0,p.MZ)({attribute:!1})],u.prototype,"supervisorUpdateConfig",void 0),u=(0,s.Cg)([(0,p.EM)("ha-backup-config-addon")],u),a()}catch(e){a(e)}})},23033(e,a,t){t.a(e,async function(e,s){try{t.r(a);var i=t(15697),p=t(57527),o=t(79224),r=t(98295),n=t(57230),c=t(88457),h=(t(75041),t(65027)),u=t(6643),d=t(82272),l=e([c,u,d]);[c,u,d]=l.then?(await l)():l;class g extends p.WF{willUpdate(e){super.willUpdate(e),!this.hasUpdated&&this.hass&&(0,r.x)(this.hass.config,"hassio")&&this._getSupervisorUpdateConfig()}render(){return p.qy` <hass-subpage back-path="/config/backup/overview" .hass=${this.hass} .narrow=${this.narrow} .header=${this.hass.localize("ui.panel.config.backup.app_update_backups.header")}> <div class="content"> <ha-card> <div class="card-content"> <p> ${this.hass.localize("ui.panel.config.backup.settings.app_update_backup.description")} </p> <p> ${this.hass.localize("ui.panel.config.backup.settings.app_update_backup.local_only")} </p> ${this._error?p.qy`<ha-alert alert-type="error">${this._error}</ha-alert>`:p.s6} <ha-backup-config-addon .hass=${this.hass} .supervisorUpdateConfig=${this._supervisorUpdateConfig} @update-config-changed=${this._supervisorUpdateConfigChanged}></ha-backup-config-addon> </div> </ha-card> </div> </hass-subpage> `}async _getSupervisorUpdateConfig(){try{this._supervisorUpdateConfig=await(0,h.y)(this.hass),this._error=void 0}catch(e){console.error(e),this._error=this.hass.localize("ui.panel.config.backup.settings.app_update_backup.error_load",{error:e?.message||e})}}async _supervisorUpdateConfigChanged(e){const a=e.detail.value;this._supervisorUpdateConfig={...this._supervisorUpdateConfig,...a},this._debounceSaveSupervisorUpdateConfig()}async _saveSupervisorUpdateConfig(){if(this._supervisorUpdateConfig)try{await(0,h.r)(this.hass,this._supervisorUpdateConfig),this._error=void 0}catch(e){console.error(e),this._error=this.hass.localize("ui.panel.config.backup.settings.app_update_backup.error_save",{error:e?.message||e?.toString()})}}constructor(...e){super(...e),this.narrow=!1,this._debounceSaveSupervisorUpdateConfig=(0,n.s)(()=>this._saveSupervisorUpdateConfig(),500)}}g.styles=p.AH`p{color:var(--secondary-text-color)}.content{gap:var(--ha-space-6);flex-direction:column;max-width:690px;margin:0 auto 24px;padding:28px 20px 0;display:flex}.card-content{padding-bottom:0}`,(0,i.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean})],g.prototype,"narrow",void 0),(0,i.Cg)([(0,o.wk)()],g.prototype,"_supervisorUpdateConfig",void 0),(0,i.Cg)([(0,o.wk)()],g.prototype,"_error",void 0),g=(0,i.Cg)([(0,o.EM)("ha-config-backup-app-update-backups")],g),s()}catch(e){s(e)}})}};
//# sourceMappingURL=19234.ddbbe1cc2df4f715.js.map