var K=Object.defineProperty,T=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var x=(t,i,e)=>i in t?K(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,b=(t,i)=>{for(var e in i||(i={}))$.call(i,e)&&x(t,e,i[e]);if(I)for(var e of I(i))L.call(i,e)&&x(t,e,i[e]);return t},y=(t,i)=>T(t,E(i));var A=(t,i,e)=>new Promise((m,c)=>{var s=n=>{try{u(e.next(n))}catch(r){c(r)}},p=n=>{try{u(e.throw(n))}catch(r){c(r)}},u=n=>n.done?m(n.value):Promise.resolve(n.value).then(s,p);u((e=e.apply(t,i)).next())});import{_ as a,j as o}from"./main.2.8.1.js";import{d}from"./react-router-dom.9mCuUg3q.js";import{S as N,I as k,E as S,G as v,A as _}from"./StepPage.B2uuvkiP.js";import{a9 as w}from"./Note.BeM7sN-p.js";import{h as f,c as G,a as B}from"./MailercloudCommonFunc.oRn-TQNp.js";import{t as F}from"./tutorialLinks.kMkIDzcD.js";import{T as j}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({mailercloudConf:t,setMailercloudConf:i,step:e,setStep:m,isInfo:c,loading:s,setLoading:p}){const[u,n]=d.useState(!1),[r,g]=d.useState({name:"",authKey:""}),{mailercloud:l}=F,P=()=>A(null,null,function*(){setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),m(2),p(y(b({},s),{page:!0})),(yield B(t,i))&&p(y(b({},s),{page:!1}))}),z=`
  <h4>${a("Step of get API Key:","bit-integrations")}</h4>
  <ul>
    <li>${a("Goto Account and click on","bit-integrations")} <a href="https://app.mailercloud.com/account/api-integrations" target='_blank'>${a("Integration","bit-integrations")}</a></li>
    <li>${a("Click on API Integrations .","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 o.jsxs(N,{step:e,stepNo:1,style:{width:900,height:"auto"},children:[o.jsx(j,{title:"Mailercloud",youTubeLink:l==null?void 0:l.youTubeLink}),o.jsx(j,{title:"Mailercloud",docLink:l==null?void 0:l.docLink}),o.jsxs("div",{className:"mt-2",children:[o.jsx(k,{label:a("Integration Name","bit-integrations"),name:"name",placeholder:a("Integration Name...","bit-integrations"),value:t.name,onchange:h=>f(h,t,i,r,g)}),o.jsx(k,{label:a("API key","bit-integrations"),name:"authKey",placeholder:a("API key...","bit-integrations"),value:t.authKey,onchange:h=>f(h,t,i,r,g)}),o.jsx(S,{error:r.authKey}),o.jsx(v,{url:"https://app.mailercloud.com/account/api-integrations",info:a("To get API key, please visit","bit-integrations")}),!c&&o.jsx(_,{onclick:()=>G(t,g,n,s,p),nextPage:P,auth:u,loading:s.auth})]}),o.jsx(w,{note:z})]})}export{Z as default};
