var T=Object.defineProperty;var x=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=(e,i,s)=>i in e?T(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,b=(e,i)=>{for(var s in i||(i={}))_.call(i,s)&&g(e,s,i[s]);if(x)for(var s of x(i))w.call(i,s)&&g(e,s,i[s]);return e};import{j as t,_ as n}from"./main.2.8.1.js";import{d as j}from"./react-router-dom.9mCuUg3q.js";import{z as L}from"./Note.BeM7sN-p.js";import{m as E}from"./MailRelayCommonFunc.aFET2gXM.js";import{t as I}from"./tutorialLinks.kMkIDzcD.js";import{T as k}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function G({mailRelayConf:e,setMailRelayConf:i,step:s,setStep:N,loading:o,setLoading:v,isInfo:r}){const[c,z]=j.useState(!1),[d,p]=j.useState({name:"",auth_token:""}),{mailRelay:a}=I,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,N(2)},l=m=>{const u=b({},e),h=b({},d);h[m.target.name]="",u[m.target.name]=m.target.value,p(h),i(u)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:s===1&&900,height:s===1&&"auto"},children:[t.jsx(k,{title:"MailRelay",youTubeLink:a==null?void 0:a.youTubeLink}),t.jsx(k,{title:"MailRelay",docLink:a==null?void 0:a.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:n("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"name",value:e.name,type:"text",placeholder:n("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:n("Your Domain Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"domain",value:e.domain,type:"text",placeholder:n("Your Account","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.domain}),t.jsx("small",{className:"d-blk mt-3",children:n("Example: bitapps.ipzmarketing.com","bit-integrations")}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:n("API Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:l,name:"auth_token",value:e.auth_token,type:"text",placeholder:n("API Token...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.auth_token}),e.domain&&t.jsxs("small",{className:"d-blk mt-3",children:[n("To Get API Token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:`https://${e.domain}.ipzmarketing.com/admin/api_keys`,target:"_blank",rel:"noreferrer",children:n("MailRelay API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>E(e,i,p,z,o,v,"authentication"),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||o.auth,children:[c?n("Authorized ✔","bit-integrations"):n("Authorize","bit-integrations"),o.auth&&t.jsx(L,{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:!c,children:[n("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{G as default};
