"use strict";(self.webpackChunkelement_web=self.webpackChunkelement_web||[]).push([[6464],{"./src/async-components/views/dialogs/security/NewRecoveryMethodDialog.tsx":(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var s=n("./node_modules/react/index.js"),o=n("./node_modules/@vector-im/compound-design-tokens/assets/web/icons/error.js"),c=n("./src/dispatcher/dispatcher.ts"),i=n("./src/languageHandler.tsx"),r=n("./src/Modal.tsx"),a=n("./src/components/views/dialogs/security/RestoreKeyBackupDialog.tsx"),l=n("./src/dispatcher/actions.ts"),d=n("./src/components/views/elements/DialogButtons.tsx"),m=n("./src/components/views/dialogs/BaseDialog.tsx"),_=n("./src/contexts/MatrixClientContext.tsx");function u({onFinished:e}){const t=(0,_.nH)(),[n,u]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{const e=t.getCrypto();u(Boolean(e&&null!==await e.getActiveSessionBackupVersion()))})()},[t]),s.createElement(m.A,{className:"mx_KeyBackupFailedDialog",onFinished:e,title:s.createElement("span",{className:"mx_KeyBackupFailedDialog_title"},s.createElement(o.A,null),(0,i._t)("encryption|new_recovery_method_detected|title"))},s.createElement("p",null,(0,i._t)("encryption|new_recovery_method_detected|description_1")),n&&s.createElement("p",null,(0,i._t)("encryption|new_recovery_method_detected|description_2")),s.createElement("strong",{className:"warning"},(0,i._t)("encryption|new_recovery_method_detected|warning")),s.createElement(d.A,{primaryButton:(0,i._t)("common|setup_secure_messages"),onPrimaryButtonClick:function(){if(n)e();else{const{finished:t}=r.Ay.createDialog(a.A,{},void 0,!1,!0);t.then(e)}},cancelButton:(0,i._t)("common|go_to_settings"),onCancel:()=>{e(),c.A.fire(l.r.ViewUserSettings)}}))}}}]);
//# sourceMappingURL=6464.js.map