(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[8792],{748792(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{"default":()=>k});var e=__webpack_require__(303280);__webpack_require__.n(e);var t=__webpack_require__(860012);var r=__webpack_require__(48084);var a=__webpack_require__(107495);var l=__webpack_require__(556734);var o=__webpack_require__(305142);var n=__webpack_require__(706794);var i=__webpack_require__(848574);var c=__webpack_require__(568894);var s=__webpack_require__(126528);var u=__webpack_require__(805600);var m=__webpack_require__(53784);var v=__webpack_require__(466770);var d=__webpack_require__(68940);var p=__webpack_require__(79222);var f=__webpack_require__(423533);var g=__webpack_require__(682988);var E=__webpack_require__(667855);var h=__webpack_require__(858753);var b=__webpack_require__(225087);var w=__webpack_require__(965657);var C=__webpack_require__(917214);var S=__webpack_require__(269243);let k=function(){let k=(0,e.c)(22);let y=(0,r.wA)();let B=(0,a.Zp)();let D=(0,C.P)();let{trackEvent:M}=t.useContext(S.O2);let T=(0,r.d4)(E.nT$);let[L,R]=(0,t.useState)("");let[_,x]=(0,t.useState)("");let[$,A]=(0,t.useState)(!1);let[N,P]=(0,t.useState)(!1);let[z,F]=(0,t.useState)(!1);let V;k[0]!==y||k[1]!==T||k[2]!==B||k[3]!==_||k[4]!==M?(V=async(e,t)=>{if(!T&&!t)return;F(!0);try{T&&await y((0,p.zFo)()),await y((0,p.Pbw)(!0)),await y((0,p.ks_)(h.S.restore)),await y((0,p.mrz)(e,_)),M({category:g.FZ.Retention,event:g.gP.WalletRestored}),B(f.Sg,{replace:!0})}catch(e){F(!1),P(!1),console.error("[RestoreVault] Error during import:",e)}},k[0]=y,k[1]=T,k[2]=B,k[3]=_,k[4]=M,k[5]=V):V=k[5];let W=V;let j;k[6]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{P(!0)},k[6]=j):j=k[6];let H=j;let I;k[7]!==z?(I=()=>{if(z)return;P(!1)},k[7]=z,k[8]=I):I=k[8];let J=I;let Z;k[9]!==y||k[10]!==B?(Z=e=>{e.preventDefault(),y((0,p.ews)()),B(f.Sg,{replace:!0})},k[9]=y,k[10]=B,k[11]=Z):Z=k[11];let G=Z;let O=N||z;let Q;return k[12]!==J||k[13]!==G||k[14]!==W||k[15]!==z||k[16]!==_||k[17]!==O||k[18]!==L||k[19]!==D||k[20]!==$?(Q=t.createElement(s.a,{flexDirection:l.uV.Column,justifyContent:l.TE.Between,gap:4,className:"import-srp-restore-vault h-full rounded-lg border border-solid","data-testid":"import-srp-restore-vault",borderColor:l.fu.BorderMuted,backgroundColor:l.v$.BackgroundDefault},O?t.createElement(w.i,{isSocialLoginFlow:!1,onSubmit:W,onBack:J,loading:z}):t.createElement(t.Fragment,null,t.createElement(s.a,null,t.createElement(s.a,{marginBottom:4},t.createElement(u.a,{iconName:o.$M.ArrowLeft,color:o.Li.IconDefault,size:n.f.Md,"data-testid":"import-srp-back-button",onClick:G,ariaLabel:D("back")})),t.createElement(s.a,{className:"text-left",marginBottom:2},t.createElement(d.E,{variant:i.J3.HeadingLg},D("importAWallet"))),t.createElement(s.a,{marginBottom:4},t.createElement(d.E,{variant:i.J3.BodyMd,color:i.r7.TextAlternative},D("restoreWalletDescription",[t.createElement(m.Q,{key:"secret-recovery-phrase",onClick:()=>A(!0)},D("secretRecoveryPhrase"))]))),t.createElement(b.A,{error:L,setSecretRecoveryPhrase:x,onClearCallback:()=>R(""),showDescription:!1,toggleSrpDetailsModal:$,onSrpDetailsModalClose:()=>A(!1)})),t.createElement(s.a,{flexDirection:l.uV.Column,justifyContent:l.TE.Center,alignItems:l.RE.Center,className:"w-full text-left"},t.createElement(v.$,{size:c.Mp.Lg,"data-testid":"import-srp-confirm",onClick:H,disabled:!_.trim()||Boolean(L),className:"import-srp__continue-button w-full"},D("continue"))))),k[12]=J,k[13]=G,k[14]=W,k[15]=z,k[16]=_,k[17]=O,k[18]=L,k[19]=D,k[20]=$,k[21]=Q):Q=k[21],Q}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);