(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)(42);let A=(0,m.P)();let C=(0,a.Zp)();let T=(0,r.wA)();let[$,L]=(0,t.useState)("");let[R,I]=(0,t.useState)("");let M=(0,r.d4)(g.nT$);let N=(0,r.d4)(w.AO);let P=(0,r.d4)(g.Qv$);let{trackEvent:B}=(0,t.useContext)(b.O2);let H;v[0]!==T||v[1]!==P||v[2]!==M||v[3]!==C||v[4]!==R||v[5]!==A||v[6]!==B?(H=async function(){try{if(!R)return;if(M){if(await T((0,p.s8B)(!0)))return}B({event:y.gP.ImportSecretRecoveryPhrase,properties:{status:"continue_button_clicked",location:"Multi SRP Import"}}),await T((0,p.nqh)(R)),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":{L(A("srpImportDuplicateAccountError"));break}default:L(A("srpAlreadyImportedError"))}}},v[0]=T,v[1]=P,v[2]=M,v[3]=C,v[4]=R,v[5]=A,v[6]=B,v[7]=H):H=v[7];let W=H;let x;v[8]!==C?(x=t.createElement(n.a,{ariaLabel:"back",iconName:l.$M.ArrowLeft,onClick:()=>{C(d.Sg)}}),v[8]=C,v[9]=x):x=v[9];let G;v[10]!==C?(G=t.createElement(n.a,{ariaLabel:"close",iconName:l.$M.Close,onClick:()=>{C(d.Sg)}}),v[10]=C,v[11]=G):G=v[11];let O;v[12]!==A?(O=A("importSecretRecoveryPhrase"),v[12]=A,v[13]=O):O=v[13];let Y;v[14]!==x||v[15]!==G||v[16]!==O?(Y=t.createElement(f.Y9,{startAccessory:x,endAccessory:G,paddingLeft:0,paddingRight:0},O),v[14]=x,v[15]=G,v[16]=O,v[17]=Y):Y=v[17];let Z;v[18]!==N?(Z=N&&t.createElement(S.A,null),v[18]=N,v[19]=Z):Z=v[19];let q;v[20]!==A?(q=A("importAWallet"),v[20]=A,v[21]=q):q=v[21];let z;v[22]!==q?(z=t.createElement(o.a,{className:"text-left",marginBottom:2},t.createElement(u.E,{variant:i.J3.HeadingLg},q)),v[22]=q,v[23]=z):z=v[23];let D;v[24]===Symbol.for("react.memo_cache_sentinel")?(D=()=>L(""),v[24]=D):D=v[24];let J;v[25]!==$?(J=t.createElement(E.A,{error:$,setSecretRecoveryPhrase:I,onClearCallback:D}),v[25]=$,v[26]=J):J=v[26];let K;v[27]!==R||v[28]!==$?(K=!R.trim()||Boolean($),v[27]=R,v[28]=$,v[29]=K):K=v[29];let Q;v[30]!==A?(Q=A("continue"),v[30]=A,v[31]=Q):Q=v[31];let j;v[32]!==W||v[33]!==K||v[34]!==Q?(j=t.createElement(o.a,{className:"w-full cta-footer"},t.createElement(s.$,{size:c.Mp.Lg,"data-testid":"import-srp-confirm",onClick:W,disabled:K,className:"w-full import-srp__continue-button"},Q)),v[32]=W,v[33]=K,v[34]=Q,v[35]=j):j=v[35];let F;return v[36]!==j||v[37]!==Y||v[38]!==Z||v[39]!==z||v[40]!==J?(F=t.createElement(f.YW,{className:"import-srp__multi-srp"},Y,Z,z,J,j),v[36]=j,v[37]=Y,v[38]=Z,v[39]=z,v[40]=J,v[41]=F):F=v[41],F}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);