var A=Object.defineProperty;var j=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var N=(r,e,i)=>e in r?A(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i,m=(r,e)=>{for(var i in e||(e={}))I.call(e,i)&&N(r,i,e[i]);if(j)for(var i of j(e))S.call(e,i)&&N(r,i,e[i]);return r};import{j as t,_ as s}from"./main.2.8.10.js";import{b as y}from"./react-router.DMwpH23k.js";import{B as E}from"./BackIcn.BFDZx8No.js";import{a2 as T,y as k}from"./Note.DalStCGz.js";import{d as B,f as C}from"./MailupCommonFunc.CtCRKgy-.js";import{T as R}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function q({formID:r,mailupConf:e,setMailupConf:i,step:p,setStep:v,isLoading:h,setIsLoading:x,setSnackbar:a,redirectLocation:z,isInfo:n}){const[l,f]=y.useState(!1),[c,b]=y.useState({dataCenter:"",clientId:""}),w=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),v(2),C(e,i,x,a)},o=d=>{const u=m({},e),g=m({},c);g[d.target.name]="",u[d.target.name]=d.target.value,b(g),i(u)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:p===1&&900,height:p===1&&"auto"},children:[t.jsx(R,{linkKey:"mailup"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"name",value:e.name,type:"text",placeholder:s("Integration Name...","bit-integrations"),disabled:n}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("Authorized Redirect URIs:","bit-integrations")})}),t.jsx(T,{value:z||`${window.location.href}`,className:"field-key-cpy w-6 ml-0",readOnly:n,setSnackbar:a}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("Client id:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"clientId",value:e.clientId,type:"text",placeholder:s("client ID...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.clientId}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("Client secret:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"clientSecret",value:e.clientSecret,type:"text",placeholder:s("client Secret...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.clientSecret}),!n&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>B("mailup",e,i,b,f,x,a),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||h,children:[l?s("Authorized ✔","bit-integrations"):s("Authorize","bit-integrations"),h&&t.jsx(k,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:w,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[s("Next","bit-integrations"),t.jsx(E,{className:"ml-1 rev-icn"})]})]})]})}export{q as default};
