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