var T=Object.defineProperty;var j=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var k=(r,e,s)=>e in r?T(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s,c=(r,e)=>{for(var s in e||(e={}))v.call(e,s)&&k(r,s,e[s]);if(j)for(var s of j(e))L.call(e,s)&&k(r,s,e[s]);return r};import{j as t,_ as n}from"./main.2.8.1.js";import{d as N}from"./react-router-dom.9mCuUg3q.js";import{B as _}from"./BackIcn._kGL_vVw.js";import{z as w}from"./Note.BeM7sN-p.js";import{a as E,f as S}from"./AcumbamailCommonFunc.CeO61pD3.js";import{t as I}from"./tutorialLinks.kMkIDzcD.js";import{T as f}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function K({formID:r,acumbamailConf:e,setAcumbamailConf:s,step:d,setstep:A,isLoading:m,setIsLoading:h,setSnackbar:B,redirectLocation:P,isInfo:a}){const{acumbamail:i}=I,[o,y]=N.useState(!1),[p,u]=N.useState({dataCenter:"",clientId:""}),z=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),A(2),S(e,s,h)},b=l=>{const x=c({},e),g=c({},p);g[l.target.name]="",x[l.target.name]=l.target.value,u(g),s(x)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:d===1&&900,height:d===1&&"auto"},children:[t.jsx(f,{title:"Acumbamail",youTubeLink:i==null?void 0:i.youTubeLink}),t.jsx(f,{title:"Acumbamail",docLink:i==null?void 0:i.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:b,name:"name",value:e.name,type:"text",placeholder:n("Integration Name...","bit-integrations"),disabled:a}),t.jsxs("small",{className:"d-blk mt-3",children:[n("To Get Client Auth token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://acumbamail.com/en/apidoc/",target:"_blank",rel:"noreferrer",children:n("Acumbamail doc","bit-integrations")})]}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:n("Auth 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:n("Auth Token...","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:p.auth_token}),!a&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>E(e,s,u,y,h),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||m,children:[o?n("Authorized ✔","bit-integrations"):n("Authorize","bit-integrations"),m&&t.jsx(w,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:z,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[n("Next","bit-integrations"),t.jsx(_,{className:"ml-1 rev-icn"})]})]})]})}export{K as default};
