var I=Object.defineProperty;var g=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var N=(l,t,a)=>t in l?I(l,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[t]=a,d=(l,t)=>{for(var a in t||(t={}))L.call(t,a)&&N(l,a,t[a]);if(g)for(var a of g(t))$.call(t,a)&&N(l,a,t[a]);return l};import{u as P,r as y,j as e,_ as s,C as z,$ as U}from"./main-40.js";import{t as v}from"./bf-892-199.js";import{T as _}from"./bf-679-136.js";import{A as B}from"./bf-541-403.js";import{N as F}from"./bf-504-404.js";import{d as H,a as O}from"./bf-636-361.js";/* empty css          */import"./bf-860-126.js";import"./bf-132-75.js";import"./bf-141-80.js";import"./bf-586-70.js";function w({formID:l,workDriveConf:t,setWorkDriveConf:a,step:o,setstep:A,isLoading:T,setisLoading:m,setSnackbar:h,redirectLocation:R,isInfo:n}){const p=P(U),{siteURL:C}=p,[x,E]=y.useState(!1),[i,u]=y.useState({dataCenter:"",clientId:"",clientSecret:""}),S=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),A(2),O(l,t,a,m,h)},r=c=>{const j=d({},t),b=d({},i);b[c.target.name]="",j[c.target.name]=c.target.value,u(b),a(j)};return e.jsxs(e.Fragment,{children:[e.jsx(_,{title:v.zohoWorkDrive.title,youTubeLink:v.zohoWorkDrive.link}),e.jsxs("div",{className:"btcd-stp-page",style:{width:o===1&&900,height:o===1&&"100%"},children:[e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Integration Name:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"name",value:t.name,type:"text",placeholder:s("Integration Name..."),disabled:n}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Data Center:")})}),e.jsxs("select",{onChange:r,name:"dataCenter",value:t.dataCenter,className:"btcd-paper-inp w-6 mt-1",disabled:n,children:[e.jsx("option",{value:"",children:s("--Select a data center--")}),e.jsx("option",{value:"com",children:"zoho.com"}),e.jsx("option",{value:"eu",children:"zoho.eu"}),e.jsx("option",{value:"com.cn",children:"zoho.com.cn"}),e.jsx("option",{value:"in",children:"zoho.in"}),e.jsx("option",{value:"com.au",children:"zoho.com.au"})]}),e.jsx("div",{style:{color:"red"},children:i.dataCenter}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Homepage URL:")})}),e.jsx(z,{value:C,className:"field-key-cpy w-6 ml-0",readOnly:n}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Authorized Redirect URIs:")})}),e.jsx(z,{value:R||`${p.zohoRedirectURL}`,className:"field-key-cpy w-6 ml-0",readOnly:n}),e.jsxs("small",{className:"d-blk mt-5",children:[s("To get Client ID and SECRET , Please Visit")," ",e.jsx("a",{className:"btcd-link",href:`https://api-console.zoho.${(t==null?void 0:t.dataCenter)||"com"}/`,target:"_blank",rel:"noreferrer",children:s("Zoho API Console")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Client id:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"clientId",value:t.clientId,type:"text",placeholder:s("Client id..."),disabled:n}),e.jsx("div",{style:{color:"red"},children:i.clientId}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Client secret:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:r,name:"clientSecret",value:t.clientSecret,type:"text",placeholder:s("Client secret..."),disabled:n}),e.jsx("div",{style:{color:"red"},children:i.clientSecret}),!n&&e.jsxs(e.Fragment,{children:[e.jsx(B,{isAuthorized:x,isloading:T,handleAuthorize:()=>H(t,a,u,E,m,h)}),e.jsx("br",{}),e.jsx(F,{nextPageHandler:()=>S(),isAuthorized:x})]})]})]})}export{w as default};
