var z=Object.defineProperty,T=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var A=(t,i,e)=>i in t?z(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,g=(t,i)=>{for(var e in i||(i={}))S.call(i,e)&&A(t,e,i[e]);if(x)for(var e of x(i))L.call(i,e)&&A(t,e,i[e]);return t},y=(t,i)=>T(t,E(i));var I=(t,i,e)=>new Promise((h,n)=>{var u=o=>{try{c(e.next(o))}catch(s){n(s)}},m=o=>{try{c(e.throw(o))}catch(s){n(s)}},c=o=>o.done?h(o.value):Promise.resolve(o.value).then(u,m);c((e=e.apply(t,i)).next())});import{_ as a,j as r}from"./main.2.8.1.js";import{d}from"./react-router-dom.9mCuUg3q.js";import{S as N,I as j,G as $,E as v,A as w}from"./StepPage.B2uuvkiP.js";import{a9 as F}from"./Note.BeM7sN-p.js";import{h as k,b as G,g as _}from"./MoosendCommonFunc.B3XBRCMC.js";import{t as B}from"./tutorialLinks.kMkIDzcD.js";import{T as f}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";import"./Integrations.D2bgBas2.js";import"./SnackMsg.S8DrwLlT.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";function Z({moosendConf:t,setMoosendConf:i,step:e,setStep:h,loading:n,setLoading:u,isInfo:m}){const[c,o]=d.useState(!1),[s,b]=d.useState({name:"",authKey:""}),{moosend:l}=B,K=()=>I(null,null,function*(){setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),h(2),u(y(g({},n),{page:!0})),(yield _(t,i))&&u(y(g({},n),{page:!1}))}),P=`
  <h4>${a("Step of get API Key:","bit-integrations")}</h4>
  <ul>
    <li>${a("First login on account.","bit-integrations")}</li>
    <li>${a("Goto Settings and click on <b>API Key</b>","bit-integrations")}</li>
    <li>${a("Copy the <b>API Key</b> and paste into <b>API Key</b> field of your authorization form.","bit-integrations")}</li>
    <li>${a("Finally, click <b>Authorize</b> button.","bit-integrations")}</li>
</ul>
`;return r.jsxs(N,{step:e,stepNo:1,style:{width:900,height:"auto"},children:[r.jsx(f,{title:"Moosend",youTubeLink:l==null?void 0:l.youTubeLink}),r.jsx(f,{title:"Moosend",docLink:l==null?void 0:l.docLink}),r.jsxs("div",{className:"mt-2",children:[r.jsx(j,{label:a("Integration Name","bit-integrations"),name:"name",placeholder:a("Integration Name...","bit-integrations"),value:t.name,onchange:p=>k(p,t,i,s,b)}),r.jsx(j,{label:a("API key","bit-integrations"),name:"authKey",placeholder:a("API key...","bit-integrations"),value:t.authKey,onchange:p=>k(p,t,i,s,b)}),r.jsx($,{url:"https://moosend.com/",info:a("To get API key, please visit","bit-integrations")}),r.jsx(v,{error:s.authKey}),!m&&r.jsx(w,{onclick:()=>G(t,b,o,n,u),nextPage:K,auth:c,loading:n.auth})]}),r.jsx(F,{note:P})]})}export{Z as default};
