var w=Object.defineProperty;var j=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var N=(n,e,i)=>e in n?w(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i,m=(n,e)=>{for(var i in e||(e={}))A.call(e,i)&&N(n,i,e[i]);if(j)for(var i of j(e))S.call(e,i)&&N(n,i,e[i]);return n};import{_ as a,j as t}from"./main.2.9.0.js";import{b as g}from"./react-router.DMwpH23k.js";import{B as T}from"./BackIcn._8Wofmn2.js";import{y as f,a9 as _}from"./Note.NSUdvR3c.js";import{a as E,f as K}from"./GroundhoggCommonFunc.Db_ALPfi.js";import{T as P}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function J({formID:n,groundhoggConf:e,setGroundhoggConf:i,step:d,setstep:y,isLoading:p,setIsLoading:b,setSnackbar:B,redirectLocation:I,isInfo:s}){const[l,k]=g.useState(!1),[o,u]=g.useState({token:"",public_key:"",domainName:""}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),y(2),K(n,e,i,b)},r=c=>{const x=m({},e),h=m({},o);h[c.target.name]="",x[c.target.name]=c.target.value,u(h),i(x)},z=`
            <h4>${a("Get Public Key and Token few step","bit-integrations")}</h4>
            <ul>
                <li>${a("First install Groundhogg.","bit-integrations")}</li>
                <li>${a('Go to <b> "Setting -> Api" </b>.',"bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:d===1&&900,height:d===1&&"auto"},children:[t.jsx(P,{linkKey:"groundhogg"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:s}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Your Domain Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"domainName",value:e.domainName,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:"true"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Public Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"public_key",value:e.public_key,type:"text",placeholder:a("Public Key...","bit-integrations"),disabled:s}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"token",value:e.token,type:"text",placeholder:a("Token...","bit-integrations"),disabled:s}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.api_key}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.clientSecret}),!s&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>E(e,i,u,k,b),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||p,children:[l?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),p&&t.jsx(f,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:v,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[a("Next","bit-integrations"),t.jsx(T,{className:"ml-1 rev-icn"})]})]}),t.jsx(_,{note:z})]})}export{J as default};
