var y=Object.defineProperty;var g=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var j=(a,e,s)=>e in a?y(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s,l=(a,e)=>{for(var s in e||(e={}))v.call(e,s)&&j(a,s,e[s]);if(g)for(var s of g(e))z.call(e,s)&&j(a,s,e[s]);return a};import{j as t,_ as r}from"./main.2.8.10.js";import{b as k}from"./react-router.DMwpH23k.js";import{B as T}from"./BackIcn.BFDZx8No.js";import{y as _}from"./Note.DalStCGz.js";import{a as w,f as E}from"./AcumbamailCommonFunc.cZLwMRLr.js";import{T as S}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function q({formID:a,acumbamailConf:e,setAcumbamailConf:s,step:c,setstep:N,isLoading:m,setIsLoading:d,setSnackbar:I,redirectLocation:B,isInfo:n}){const[i,f]=k.useState(!1),[h,p]=k.useState({dataCenter:"",clientId:""}),A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),N(2),E(e,s,d)},b=o=>{const u=l({},e),x=l({},h);x[o.target.name]="",u[o.target.name]=o.target.value,p(x),s(u)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:c===1&&900,height:c===1&&"auto"},children:[t.jsx(S,{linkKey:"acumbamail"}),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:n}),t.jsxs("small",{className:"d-blk mt-3",children:[r("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:r("Acumbamail doc","bit-integrations")})]}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:r("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:r("Auth Token...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:h.auth_token}),!n&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>w(e,s,p,f,d),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:i||m,children:[i?r("Authorized ✔","bit-integrations"):r("Authorize","bit-integrations"),m&&t.jsx(_,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:A,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!i,children:[r("Next","bit-integrations"),t.jsx(T,{className:"ml-1 rev-icn"})]})]})]})}export{q as default};
