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