var f=Object.defineProperty;var b=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var N=(i,a,n)=>a in i?f(i,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[a]=n,p=(i,a)=>{for(var n in a||(a={}))A.call(a,n)&&N(i,n,a[n]);if(b)for(var n of b(a))S.call(a,n)&&N(i,n,a[n]);return i};import{r as k,j as e}from"./main-406.js";import{B as T}from"./bi.46.744.js";import{_ as s,L as _}from"./bi.394.85.js";import{a as w,f as E}from"./bi.844.788.js";import{T as y,t as I}from"./bi.150.760.js";function H({formID:i,bitFormConf:a,setBitFormConf:n,step:m,setstep:v,isLoading:u,setIsLoading:h,setSnackbar:B,redirectLocation:C,isInfo:r}){const[l,z]=k.useState(!1),{bitForm:t}=I,[c,x]=k.useState({dataCenter:"",api_key:""}),L=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),v(2),E(a,n,h)},d=o=>{const g=p({},a),j=p({},c);j[o.target.name]="",g[o.target.name]=o.target.value,x(j),n(g)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:m===1&&900,height:m===1&&"auto"},children:[(t==null?void 0:t.youTubeLink)&&e.jsx(y,{title:t==null?void 0:t.title,youTubeLink:t==null?void 0:t.youTubeLink}),(t==null?void 0:t.docLink)&&e.jsx(y,{title:t==null?void 0:t.title,docLink:t==null?void 0:t.docLink}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"name",value:a.name,type:"text",placeholder:s("Integration Name...","bit-integrations"),disabled:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Your Domain Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"domainName",value:a.domainName,type:"text",placeholder:s("Integration Name...","bit-integrations"),disabled:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Client id:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"api_key",value:a.api_key,type:"text",placeholder:s("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(a,n,x,z,h),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||u,children:[l?s("Authorized ✔","bit-integrations"):s("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:[s("Next","bit-integrations"),e.jsx(T,{className:"ml-1 rev-icn"})]})]})]})}export{H as default};
