import{eM as b,b as e,c as k,q as d,bV as D,dt as O}from"./index-6Jqoo2rk.js";import{a as A}from"./transition-DuxZkCEv.js";import{I as g}from"./emailSetup-CFcJlzt-.js";import{a0 as M,aI as P,aJ as T,aK as I,ap as w,a1 as x}from"./appDialogsManager-DnVhdlim.js";import{u as F,S as L}from"./saveButton-BN9ptO_C.js";import{S as R}from"./settingsTabLottieAnimation-CjBbsXGV.js";import{S as f}from"./space-DBcSn32d.js";import{S as H}from"./staticRadio-Bl1PeWYg.js";import K from"./index-BBTFYOs7.js";import"./iconTsx-Cr8T7ZIv.js";import"./bootstrapIm-BS8HLnlI.js";import"./mediaHeader-B5k-4_FU.js";import"./animations-O3syBkMX.js";import"./accumulate-BydAFozl.js";import"./browser-BlRx6CLO.js";import"./_commonjsHelpers-DsqdWQfm.js";import"./putPreloader-WBjcuDFX.js";import"./htmlToSpan-DhAls8qz.js";import"./anchorCallback-DsA1XczG.js";import"./toast-B3QB1-N7.js";import"./paintQrCode-u2FNs0A8.js";import"./fastBlur-Co-79rP4.js";import"./telInputField-Fj4gE689.js";import"./readBlobAsDataURL-DL2tTmc_.js";import"./tracking-CIK7NCFD.js";import"./getInputPasskeyResponse-RiY9Fe0r.js";import"./base64ToBytes-B7rMxzcy.js";import"./sha256-BMgYLqDy.js";import"./bytesCmp-DgkPox5J.js";import"./useSwipe-COx9W9fX.js";import"./useIsCleaned-qdS5-id0.js";import"./useScrollTop-BklsIon0.js";const fe=()=>{const{Row:o,rootScope:h,HotReloadGuard:C}=b(),[r]=M(),p=P(r.payload.period)?.value||r.payload.period,n=T({offLabel:()=>A(()=>e(g,{key:"Off"}),t=>t instanceof Element)()}),[a,m]=k(p),s=d(()=>a()!==p),S=d(()=>{const t=[...n],l=a();for(let i=n.length-1;i>=0;i--){const u=n[i].value;if(l===u)break;if(l>u){t.splice(i+1,0,I(l));break}}return t}),c=x(async()=>{if(s())try{await h.managers.appPrivacyManager.setDefaultAutoDeletePeriod(a()),r.payload.onSaved(a())}finally{r.close()}});r.isConfirmationNeededOnClose=F({descriptionLangKey:"UnsavedChangesDescription.Privacy",hasChanges:s,saveAllSettings:c});const v=t=>{m(t.value)},y=()=>{new K({HotReloadGuard:C,descriptionLangKey:"AutoDeleteMessages.InfoDefault",onFinish:t=>{m(t)},period:a()}).show()};return[e(D,{get mount(){return r.header},get children(){return e(L,{get hasChanges(){return s()},onClick:()=>{c()}})}}),e(f,{amount:"1rem"}),e(R,{name:"UtyanDisappear"}),e(f,{amount:"2rem"}),e(w,{name:"AutoDeleteMessages.SectionTitle",caption:"AutoDeleteMessages.SectionCaption",get children(){return[e(O,{get each(){return S()},children:t=>e(o,{clickable:[v,t],get children(){return[e(o.CheckboxField,{get children(){return e(H,{floating:!0,get checked(){return a()===t.value}})}}),e(o.Title,{get children(){return t.label()}})]}})}),e(o,{clickable:y,get children(){return[e(o.Icon,{icon:"tools"}),e(o.Title,{get children(){return e(g,{key:"AutoDeleteMessages.SetOtherTime"})}})]}})]}})]};export{fe as default};
//# sourceMappingURL=index-WjQ2hY8l.js.map
