Build 542549stable
Module 970931
880 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{ES:()=>h,kB:()=>f});var i=n(406935),r=n(157559),s=n(827827),a=n(885386),o=n(594061),l=n(461213),u=n(174459),c=n(406535),d=n(652215),_=n(375708);function f(){let e=a.NO.useSetting(),t=a.Jr.useSetting();return e&&("0"===t||new Date(Number(t)).getTime()-new Date().getTime()>0)}function h(e,t){let n=a.NO.getSetting();o.wc.updateAsync("notifications",n=>{n.quietMode=i._t.create({value:e}),n.focusModeExpiresAtMs=e&&null!=t?`${Date.now()+t}`:"0"},o.Sb.INFREQUENT_USER_ACTION),u.default.track(d.HAw.NOTIFICATION_SETTINGS_UPDATED,{update_type:c.Y.ACCOUNT,quiet_mode_enabled:e,quiet_mode_enabled_old:n}),l.A.getStatus()===d.clD.DND&&e&&null==t&&r.A.show({title:_.intl.string(_.t["B+cbLS"]),body:_.intl.string(_.t.CYVgLI),cancelText:_.intl.string(_.t.f3Pet9),confirmText:_.intl.string(_.t.BddRzS),onConfirm:()=>{(0,s.A)({nextStatus:d.clD.ONLINE})}})}}