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