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