(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[5657],{145657(__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__,{ImportSrp:()=>e.p});var e=__webpack_require__(398778)}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()},398778(__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__.d(__webpack_exports__,{p:()=>A});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__(305142);var i=__webpack_require__(848574);var c=__webpack_require__(568894);var n=__webpack_require__(805600);var o=__webpack_require__(126528);var s=__webpack_require__(466770);var u=__webpack_require__(68940);var m=__webpack_require__(917214);var p=__webpack_require__(79222);var d=__webpack_require__(880909);var h=__webpack_require__(507475);var v=__webpack_require__(423533);var f=__webpack_require__(697141);var g=__webpack_require__(732806);var w=__webpack_require__(83432);var S=__webpack_require__(896336);var b=__webpack_require__(225087);var E=__webpack_require__(682988);var y=__webpack_require__(518176);let _="new-srp-added-toast";let k=5*d.Z2;let A=()=>{let d=(0,e.c)(43);let A=(0,m.P)();let C=(0,a.Zp)();let T=(0,r.wA)();let[$,L]=(0,t.useState)("");let[R,P]=(0,t.useState)("");let I=(0,r.d4)(g.nT$);let M=(0,r.d4)(w.AO);let N=(0,r.d4)(g.Qv$);let{trackEvent:B,createEventBuilder:H}=(0,y.s)();let W;d[0]!==H||d[1]!==T||d[2]!==N||d[3]!==I||d[4]!==C||d[5]!==R||d[6]!==A||d[7]!==B?(W=async function(){try{if(!R)return;if(I){if(await T((0,p.s8B)(!0)))return}B(H(E.gP.ImportSecretRecoveryPhrase).addProperties({status:"continue_button_clicked",location:"Multi SRP Import"}).build()),await T((0,p.nqh)(R)),h.oR.success(t.createElement(h.pi,{dataTestId:_,title:A("importWalletSuccess",[N.length+1])}),{id:_,duration:k}),C(v.Sg)}catch(e){switch(e?.message){case"KeyringController - The account you are trying to import is a duplicate":{L(A("srpImportDuplicateAccountError"));break}default:L(A("srpAlreadyImportedError"))}}},d[0]=H,d[1]=T,d[2]=N,d[3]=I,d[4]=C,d[5]=R,d[6]=A,d[7]=B,d[8]=W):W=d[8];let G=W;let Y;d[9]!==C?(Y=t.createElement(n.a,{ariaLabel:"back",iconName:l.$M.ArrowLeft,onClick:()=>{C(v.Sg)}}),d[9]=C,d[10]=Y):Y=d[10];let Z;d[11]!==C?(Z=t.createElement(n.a,{ariaLabel:"close",iconName:l.$M.Close,onClick:()=>{C(v.Sg)}}),d[11]=C,d[12]=Z):Z=d[12];let q;d[13]!==A?(q=A("importSecretRecoveryPhrase"),d[13]=A,d[14]=q):q=d[14];let x;d[15]!==Y||d[16]!==Z||d[17]!==q?(x=t.createElement(f.Y9,{startAccessory:Y,endAccessory:Z,paddingLeft:0,paddingRight:0},q),d[15]=Y,d[16]=Z,d[17]=q,d[18]=x):x=d[18];let z;d[19]!==M?(z=M&&t.createElement(S.A,null),d[19]=M,d[20]=z):z=d[20];let D;d[21]!==A?(D=A("importAWallet"),d[21]=A,d[22]=D):D=d[22];let J;d[23]!==D?(J=t.createElement(o.a,{className:"text-left",marginBottom:2},t.createElement(u.E,{variant:i.J3.HeadingLg},D)),d[23]=D,d[24]=J):J=d[24];let K;d[25]===Symbol.for("react.memo_cache_sentinel")?(K=()=>L(""),d[25]=K):K=d[25];let O;d[26]!==$?(O=t.createElement(b.A,{error:$,setSecretRecoveryPhrase:P,onClearCallback:K}),d[26]=$,d[27]=O):O=d[27];let Q;d[28]!==R||d[29]!==$?(Q=!R.trim()||Boolean($),d[28]=R,d[29]=$,d[30]=Q):Q=d[30];let j;d[31]!==A?(j=A("continue"),d[31]=A,d[32]=j):j=d[32];let F;d[33]!==G||d[34]!==Q||d[35]!==j?(F=t.createElement(o.a,{className:"w-full cta-footer"},t.createElement(s.$,{size:c.Mp.Lg,"data-testid":"import-srp-confirm",onClick:G,disabled:Q,className:"w-full import-srp__continue-button"},j)),d[33]=G,d[34]=Q,d[35]=j,d[36]=F):F=d[36];let U;return d[37]!==F||d[38]!==x||d[39]!==z||d[40]!==J||d[41]!==O?(U=t.createElement(f.YW,{className:"import-srp__multi-srp"},x,z,J,O,F),d[37]=F,d[38]=x,d[39]=z,d[40]=J,d[41]=O,d[42]=U):U=d[42],U}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);