var C=Object.defineProperty;var v=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var N=(l,t,a)=>t in l?C(l,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[t]=a,o=(l,t)=>{for(var a in t||(t={}))E.call(t,a)&&N(l,a,t[a]);if(v)for(var a of v(t))I.call(t,a)&&N(l,a,t[a]);return l};import{u as L,r as y,j as e,_ as r,C as z,$}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{b as B,r as D}from"./bf-102-359.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,signConf:t,setSignConf:a,step:d,setstep:g,isLoading:w,setisLoading:m,setSnackbar:h,redirectLocation:T,isInfo:s}){const p=L($),{siteURL:k}=p,[x,R]=y.useState(!1),[i,u]=y.useState({dataCenter:"",clientId:"",clientSecret:""}),S=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),g(2),D(l,t,a,m,h)},c=n=>{const j=o({},t),b=o({},i);b[n.target.name]="",j[n.target.name]=n.target.value,u(b),a(j)};return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:A.zohoSign.title,youTubeLink:A.zohoSign.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:c,name:"name",value:t.name,type:"text",placeholder:r("Integration Name..."),disabled:s}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("Data Center:")})}),e.jsxs("select",{onChange:c,name:"dataCenter",value:t.dataCenter,className:"btcd-paper-inp w-6 mt-1",disabled:s,children:[e.jsx("option",{value:"",children:r("--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:r("Homepage URL:")})}),e.jsx(z,{value:k,className:"field-key-cpy w-6 ml-0",readOnly:s}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("Authorized Redirect URIs:")})}),e.jsx(z,{value:T||`${p.zohoRedirectURL}`,className:"field-key-cpy w-6 ml-0",readOnly:s}),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://api-console.zoho.${(t==null?void 0:t.dataCenter)||"com"}/`,target:"_blank",rel:"noreferrer",children:r("Zoho 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:c,name:"clientId",value:t.clientId,type:"text",placeholder:r("Client id..."),disabled:s}),e.jsx("div",{style:{color:"red"},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:c,name:"clientSecret",value:t.clientSecret,type:"text",placeholder:r("Client secret..."),disabled:s}),e.jsx("div",{style:{color:"red"},children:i.clientSecret}),!s&&e.jsxs(e.Fragment,{children:[e.jsx(U,{isAuthorized:x,isLoading:w,handleAuthorize:()=>B(t,a,u,R,m,h)}),e.jsx("br",{}),e.jsx(_,{nextPageHandler:()=>S(),disabled:!x})]})]})]})}export{X as default};
