var L=Object.defineProperty;var m=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var g=(s,n,r)=>n in s?L(s,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[n]=r,u=(s,n)=>{for(var r in n||(n={}))T.call(n,r)&&g(s,r,n[r]);if(m)for(var r of m(n))j.call(n,r)&&g(s,r,n[r]);return s};import{r as y,j as t}from"./main-406.js";import{_ as i,L as z}from"./bi.394.85.js";import{m as w}from"./bi.331.840.js";import{T as k,t as S}from"./bi.150.760.js";function B({mailjetConf:s,setMailjetConf:n,step:r,setStep:N,loading:c,setLoading:v,isInfo:a}){const[o,A]=y.useState(!1),[d,p]=y.useState({name:"",secretKey:""}),{mailjet:e}=S,K=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),s!=null&&s.default,N(2)},l=b=>{const h=u({},s),x=u({},d);x[b.target.name]="",h[b.target.name]=b.target.value,p(x),n(h)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:r===1&&900,height:r===1&&"auto"},children:[(e==null?void 0:e.youTubeLink)&&t.jsx(k,{title:e==null?void 0:e.title,youTubeLink:e==null?void 0:e.youTubeLink}),(e==null?void 0:e.docLink)&&t.jsx(k,{title:e==null?void 0:e.title,docLink:e==null?void 0:e.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"name",value:s.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:a}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("API Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"apiKey",value:s.apiKey,type:"text",placeholder:i("Your Account","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.apiKey}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("Secret Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"secretKey",value:s.secretKey,type:"text",placeholder:i("API Token...","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.secretKey}),t.jsxs("small",{className:"d-blk mt-3",children:[i("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:i("Mailjet API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!a&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>w(s,n,p,A,c,v,"authentication"),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||c.auth,children:[o?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),c.auth&&t.jsx(z,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:K,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[i("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{B as default};
