var f=Object.defineProperty;var j=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var N=(s,t,a)=>t in s?f(s,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[t]=a,m=(s,t)=>{for(var a in t||(t={}))A.call(t,a)&&N(s,a,t[a]);if(j)for(var a of j(t))S.call(t,a)&&N(s,a,t[a]);return s};import{r as k,j as e}from"./main-333.js";import{B as T}from"./bi.429.767.js";import{_ as i,L as _}from"./bi.636.93.js";import{a as w,f as E}from"./bi.964.811.js";import{T as y,t as B}from"./bi.318.783.js";function H({formID:s,bitFormConf:t,setBitFormConf:a,step:p,setstep:v,isLoading:u,setIsLoading:h,setSnackbar:I,redirectLocation:D,isInfo:r}){const[l,z]=k.useState(!1),{bitForm:n}=B,[c,x]=k.useState({dataCenter:"",api_key:""}),L=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),v(2),E(t,a,h)},o=d=>{const b=m({},t),g=m({},c);g[d.target.name]="",b[d.target.name]=d.target.value,x(g),a(b)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:p===1&&900,height:p===1&&"auto"},children:[(n==null?void 0:n.youTubeLink)&&e.jsx(y,{title:"Bit Form",youTubeLink:n==null?void 0:n.youTubeLink}),(n==null?void 0:n.docLink)&&e.jsx(y,{title:"Bit Form",docLink:n==null?void 0:n.docLink}),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:r}),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:r}),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:r}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.api_key}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.clientSecret}),!r&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>w(t,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&&e.jsx(_,{size:20,clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:L,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[i("Next","bit-integrations"),e.jsx(T,{className:"ml-1 rev-icn"})]})]})]})}export{H as default};
