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