(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[5474],{775474(__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__(978657)}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()},978657(__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__(515863);__webpack_require__.n(e);var t=__webpack_require__(67659);var r=__webpack_require__(833081);var a=__webpack_require__(147928);var l=__webpack_require__(330791);var i=__webpack_require__(301619);var c=__webpack_require__(652335);var n=__webpack_require__(330189);var o=__webpack_require__(954817);var s=__webpack_require__(564063);var u=__webpack_require__(33745);var m=__webpack_require__(308571);var p=__webpack_require__(440869);var v=__webpack_require__(155504);var h=__webpack_require__(430652);var d=__webpack_require__(992996);var f=__webpack_require__(532194);var g=__webpack_require__(739506);var w=__webpack_require__(566941);var S=__webpack_require__(584067);var E=__webpack_require__(82990);var b=__webpack_require__(507014);var y=__webpack_require__(449839);let _="new-srp-added-toast";let k=5*v.Z2;let A=()=>{let v=(0,e.c)(45);let A=(0,m.P)();let C=(0,a.Zp)();let R=(0,r.wA)();let[T,$]=(0,t.useState)("");let[L,N]=(0,t.useState)("");let I=(0,r.d4)(g.nT$);let M=(0,r.d4)(w.AO);let P=(0,r.d4)(g.Qv$);let{trackEvent:B}=(0,t.useContext)(b.O2);let H;let W;v[0]!==R?(H=()=>()=>{R((0,p.RNj)())},W=[R],v[0]=R,v[1]=H,v[2]=W):(H=v[1],W=v[2]),(0,t.useEffect)(H,W);let x;v[3]!==R||v[4]!==P||v[5]!==I||v[6]!==C||v[7]!==L||v[8]!==A||v[9]!==B?(x=async function(){try{if(!L)return;if(I){if(await R((0,p.s8B)(!0)))return}B({event:y.gP.ImportSecretRecoveryPhrase,properties:{status:"continue_button_clicked",location:"Multi SRP Import"}}),await R((0,p.nqh)(L)),h.oR.success(t.createElement(h.pi,{dataTestId:_,title:A("importWalletSuccess",[P.length+1])}),{id:_,duration:k}),C(d.Sg)}catch(e){switch(e?.message){case"KeyringController - The account you are trying to import is a duplicate":{$(A("srpImportDuplicateAccountError"));break}default:$(A("srpAlreadyImportedError"))}}},v[3]=R,v[4]=P,v[5]=I,v[6]=C,v[7]=L,v[8]=A,v[9]=B,v[10]=x):x=v[10];let G=x;let O;v[11]!==C?(O=t.createElement(n.a,{ariaLabel:"back",iconName:l.$M.ArrowLeft,onClick:()=>{C(d.Sg)}}),v[11]=C,v[12]=O):O=v[12];let Y;v[13]!==C?(Y=t.createElement(n.a,{ariaLabel:"close",iconName:l.$M.Close,onClick:()=>{C(d.Sg)}}),v[13]=C,v[14]=Y):Y=v[14];let Z;v[15]!==A?(Z=A("importSecretRecoveryPhrase"),v[15]=A,v[16]=Z):Z=v[16];let j;v[17]!==O||v[18]!==Y||v[19]!==Z?(j=t.createElement(f.Y9,{startAccessory:O,endAccessory:Y,paddingLeft:0,paddingRight:0},Z),v[17]=O,v[18]=Y,v[19]=Z,v[20]=j):j=v[20];let q;v[21]!==M?(q=M&&t.createElement(S.A,null),v[21]=M,v[22]=q):q=v[22];let z;v[23]!==A?(z=A("importAWallet"),v[23]=A,v[24]=z):z=v[24];let D;v[25]!==z?(D=t.createElement(o.a,{className:"text-left",marginBottom:2},t.createElement(u.E,{variant:i.J3.HeadingLg},z)),v[25]=z,v[26]=D):D=v[26];let J;v[27]===Symbol.for("react.memo_cache_sentinel")?(J=()=>$(""),v[27]=J):J=v[27];let K;v[28]!==T?(K=t.createElement(E.A,{error:T,setSecretRecoveryPhrase:N,onClearCallback:J}),v[28]=T,v[29]=K):K=v[29];let Q;v[30]!==L||v[31]!==T?(Q=!L.trim()||Boolean(T),v[30]=L,v[31]=T,v[32]=Q):Q=v[32];let F;v[33]!==A?(F=A("continue"),v[33]=A,v[34]=F):F=v[34];let U;v[35]!==G||v[36]!==Q||v[37]!==F?(U=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"},F)),v[35]=G,v[36]=Q,v[37]=F,v[38]=U):U=v[38];let V;return v[39]!==K||v[40]!==U||v[41]!==j||v[42]!==q||v[43]!==D?(V=t.createElement(f.YW,{className:"import-srp__multi-srp"},j,q,D,K,U),v[39]=K,v[40]=U,v[41]=j,v[42]=q,v[43]=D,v[44]=V):V=v[44],V}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);