var k=Object.defineProperty;var u=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var b=(s,t,a)=>t in s?k(s,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[t]=a,d=(s,t)=>{for(var a in t||(t={}))z.call(t,a)&&b(s,a,t[a]);if(u)for(var a of u(t))_.call(t,a)&&b(s,a,t[a]);return s};import{r as p,j as e,_ as i}from"./main-634.js";import{a6 as w}from"./bf-746-82.js";import{h as A}from"./bf-935-178.js";import"./bf-275-83.js";import"./bf-822-108.js";function I({formID:s,groundhoggConf:t,setGroundhoggConf:a,step:S,setstep:E,isLoading:j,setIsLoading:N,setSnackbar:f,isInfo:r,authorizedAction:y}){const[l,v]=p.useState(!1),[c,o]=p.useState({token:"",public_key:"",domainName:""}),n=m=>{const h=d({},t),x=d({},c);x[m.target.name]="",h[m.target.name]=m.target.value,o(x),a(h)};return p.useEffect(()=>{l&&y()},[l]),e.jsxs("div",{className:"btcd-stp-page",style:{width:900,height:"auto"},children:[e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Integration Name:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"name",value:t.name,type:"text",placeholder:i("Integration Name..."),disabled:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Your Domain Name:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"domainName",value:t.domainName,type:"text",placeholder:i("Integration Name..."),disabled:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Public Key:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"public_key",value:t.public_key,type:"text",placeholder:i("Public Key..."),disabled:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Token:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"token",value:t.token,type:"text",placeholder:i("Token..."),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.jsx(w,{isAuthorized:l,isLoading:j,handleAuthorize:()=>A(t,a,o,v,N)}),e.jsx("br",{})]})]})}export{I as default};
