var C=Object.defineProperty;var j=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=(l,t,s)=>t in l?C(l,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[t]=s,o=(l,t)=>{for(var s in t||(t={}))R.call(t,s)&&g(l,s,t[s]);if(j)for(var s of j(t))w.call(t,s)&&g(l,s,t[s]);return l};import{r as m,u as E,j as e,_ as a,C as b,$ as I}from"./main-343.js";import{t as v}from"./bf-974-82.js";import{a5 as L,a6 as T}from"./bf-659-81.js";import{h as U}from"./bf-997-171.js";function V({formID:l,sheetConf:t,setSheetConf:s,step:_,setstep:$,isLoading:N,setisLoading:y,setSnackbar:S,redirectLocation:k,isInfo:r,authorizedAction:z}){const[i,A]=m.useState(!1),[n,p]=m.useState({clientId:"",clientSecret:""}),h=E(I),{siteURL:f}=h,c=d=>{const x=o({},t),u=o({},n);u[d.target.name]="",x[d.target.name]=d.target.value,p(u),s(x)};return m.useEffect(()=>{i&&z()},[i]),e.jsxs(e.Fragment,{children:[e.jsx(L,{title:v.googelSheets.title,youTubeLink:v.googelSheets.link}),e.jsxs("div",{className:"btcd-stp-page",style:{width:900,height:"100%"},children:[e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Integration Name:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"name",value:t.name,type:"text",placeholder:a("Integration Name..."),disabled:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Homepage URL:")})}),e.jsx(b,{value:f,className:"field-key-cpy w-6 ml-0",readOnly:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Authorized Redirect URIs:")})}),e.jsx(b,{value:k||`${h.googleRedirectURL}`,className:"field-key-cpy w-6 ml-0",readOnly:r}),e.jsxs("small",{className:"d-blk mt-5",children:[a("To get Client ID and SECRET , Please Visit")," ",e.jsx("a",{className:"btcd-link",href:"https://console.developers.google.com/apis/credentials",target:"_blank",rel:"noreferrer",children:a("Google API Console")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Client id:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"clientId",value:t.clientId,type:"text",placeholder:a("Client id..."),disabled:r}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:n.clientId}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Client secret:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"clientSecret",value:t.clientSecret,type:"text",placeholder:a("Client secret..."),disabled:r}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:n.clientSecret}),!r&&e.jsxs(e.Fragment,{children:[e.jsx(T,{isAuthorized:i,isLoading:N,handleAuthorize:()=>U(t,s,p,A,y,S)}),e.jsx("br",{})]})]})]})}export{V as default};
