var k=Object.defineProperty;var h=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var x=(t,s,a)=>s in t?k(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a,m=(t,s)=>{for(var a in s||(s={}))A.call(s,a)&&x(t,a,s[a]);if(h)for(var a of h(s))K.call(s,a)&&x(t,a,s[a]);return t};import{j as e,_ as i}from"./main.2.8.10.js";import{b as g}from"./react-router.DMwpH23k.js";import{y as z}from"./Note.DalStCGz.js";import{m as w}from"./MailjetCommonFunc.BV-1x4TT.js";import{T as S}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function G({mailjetConf:t,setMailjetConf:s,step:a,setStep:y,loading:n,setLoading:j,isInfo:r}){const[c,N]=g.useState(!1),[l,p]=g.useState({name:"",secretKey:""}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t!=null&&t.default,y(2)},o=d=>{const b=m({},t),u=m({},l);u[d.target.name]="",b[d.target.name]=d.target.value,p(u),s(b)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[e.jsx(S,{linkKey:"mailjet"}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"name",value:t.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("API Key:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"apiKey",value:t.apiKey,type:"text",placeholder:i("Your Account","bit-integrations"),disabled:r}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.apiKey}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Secret Key:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"secretKey",value:t.secretKey,type:"text",placeholder:i("API Token...","bit-integrations"),disabled:r}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.secretKey}),e.jsxs("small",{className:"d-blk mt-3",children:[i("To Get API key & Secret Key, Please Visit","bit-integrations")," ",e.jsx("a",{className:"btcd-link",href:"https://app.mailjet.com/account/apikeys",target:"_blank",rel:"noreferrer",children:i("Mailjet API Token","bit-integrations")})]}),e.jsx("br",{}),e.jsx("br",{}),!r&&e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>w(t,s,p,N,n,j,"authentication"),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||n.auth,children:[c?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),n.auth&&e.jsx(z,{size:"20",clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:v,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[i("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{G as default};
