var E=Object.defineProperty;var b=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var N=(l,t,s)=>t in l?E(l,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[t]=s,o=(l,t)=>{for(var s in t||(t={}))C.call(t,s)&&N(l,s,t[s]);if(b)for(var s of b(t))I.call(t,s)&&N(l,s,t[s]);return l};import{r as v,u as f,j as e,_ as r,C as y,$ as L}from"./main-40.js";import{t as A}from"./bf-892-199.js";import{T as P}from"./bf-679-136.js";import{A as U}from"./bf-541-403.js";import{N as _}from"./bf-504-404.js";import{c as $,r as B}from"./bf-768-364.js";/* empty css          */import"./bf-860-126.js";import"./bf-132-75.js";import"./bf-141-80.js";import"./bf-586-70.js";function X({formID:l,sheetConf:t,setSheetConf:s,step:d,setstep:S,isLoading:z,setisLoading:m,setSnackbar:p,redirectLocation:k,isInfo:a}){const[x,w]=v.useState(!1),[i,h]=v.useState({clientId:"",clientSecret:""}),u=f(L),{siteURL:R}=u,n=c=>{const g=o({},t),j=o({},i);j[c.target.name]="",g[c.target.name]=c.target.value,h(j),s(g)},T=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),S(2),B(l,t,s,m,p)};return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:A.googelSheets.title,youTubeLink:A.googelSheets.link}),e.jsxs("div",{className:"btcd-stp-page",style:{width:d===1&&900,height:d===1&&"100%"},children:[e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("Integration Name:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"name",value:t.name,type:"text",placeholder:r("Integration Name..."),disabled:a}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("Homepage URL:")})}),e.jsx(y,{value:R,className:"field-key-cpy w-6 ml-0",readOnly:a}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("Authorized Redirect URIs:")})}),e.jsx(y,{value:k||`${u.googleRedirectURL}`,className:"field-key-cpy w-6 ml-0",readOnly:a}),e.jsxs("small",{className:"d-blk mt-5",children:[r("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:r("Google API Console")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("Client id:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"clientId",value:t.clientId,type:"text",placeholder:r("Client id..."),disabled:a}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:i.clientId}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("Client secret:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"clientSecret",value:t.clientSecret,type:"text",placeholder:r("Client secret..."),disabled:a}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:i.clientSecret}),!a&&e.jsxs(e.Fragment,{children:[e.jsx(U,{isAuthorized:x,isLoading:z,handleAuthorize:()=>$(t,s,h,w,m,p)}),e.jsx("br",{}),e.jsx(_,{nextPageHandler:()=>T(),disabled:!x})]})]})]})}export{X as default};
