var w=Object.defineProperty;var N=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var k=(n,e,i)=>e in n?w(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i,d=(n,e)=>{for(var i in e||(e={}))A.call(e,i)&&k(n,i,e[i]);if(N)for(var i of N(e))S.call(e,i)&&k(n,i,e[i]);return n};import{_ as a,j as t}from"./main.2.8.1.js";import{d as y}from"./react-router-dom.9mCuUg3q.js";import{B as _}from"./BackIcn._kGL_vVw.js";import{z as L,a9 as E}from"./Note.BeM7sN-p.js";import{a as G,f as P}from"./GroundhoggCommonFunc.IzYgFdLJ.js";import{t as B}from"./tutorialLinks.kMkIDzcD.js";import{T as g}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function O({formID:n,groundhoggConf:e,setGroundhoggConf:i,step:p,setstep:v,isLoading:b,setIsLoading:u,setSnackbar:I,redirectLocation:K,isInfo:r}){const[o,z]=y.useState(!1),[c,x]=y.useState({token:"",public_key:"",domainName:""}),{groundhogg:s}=B,T=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),v(2),P(n,e,i,u)},l=m=>{const h=d({},e),j=d({},c);j[m.target.name]="",h[m.target.name]=m.target.value,x(j),i(h)},f=`
            <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:p===1&&900,height:p===1&&"auto"},children:[t.jsx(g,{title:"Groundhogg",youTubeLink:s==null?void 0:s.youTubeLink}),t.jsx(g,{title:"Groundhogg",docLink:s==null?void 0:s.docLink}),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:l,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:r}),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:l,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:l,name:"public_key",value:e.public_key,type:"text",placeholder:a("Public Key...","bit-integrations"),disabled:r}),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:l,name:"token",value:e.token,type:"text",placeholder:a("Token...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.api_key}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.clientSecret}),!r&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>G(e,i,x,z,u),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||b,children:[o?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),b&&t.jsx(L,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:T,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[a("Next","bit-integrations"),t.jsx(_,{className:"ml-1 rev-icn"})]})]}),t.jsx(E,{note:f})]})}export{O as default};
