var K=Object.defineProperty;var x=Object.getOwnPropertySymbols;var L=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,u=(e,s)=>{for(var i in s||(s={}))L.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{r as y,j as t}from"./main-333.js";import{_ as a,L as z}from"./bi.636.93.js";import{m as w}from"./bi.265.863.js";import{T as k,t as S}from"./bi.318.783.js";function f({mailjetConf:e,setMailjetConf:s,step:i,setStep:N,loading:c,setLoading:j,isInfo:r}){const[o,v]=y.useState(!1),[l,p]=y.useState({name:"",secretKey:""}),{mailjet:n}=S,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,N(2)},d=b=>{const h=u({},e),m=u({},l);m[b.target.name]="",h[b.target.name]=b.target.value,p(m),s(h)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:i===1&&900,height:i===1&&"auto"},children:[(n==null?void 0:n.youTubeLink)&&t.jsx(k,{title:"Mailjet",youTubeLink:n==null?void 0:n.youTubeLink}),(n==null?void 0:n.docLink)&&t.jsx(k,{title:"Mailjet",docLink:n==null?void 0:n.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:r}),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:r}),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:r}),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",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>w(e,s,p,v,c,j,"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(z,{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{f as default};
