| 1 |
var R=Object.defineProperty;var A=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var w=(n,t,s)=>t in n?R(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s,S=(n,t)=>{for(var s in t||(t={}))E.call(t,s)&&w(n,s,t[s]);if(A)for(var s of A(t))L.call(t,s)&&w(n,s,t[s]);return n};import{u as T,$ as I,r,j as e,_ as a,C,F as Z,g as $,S as D}from"./main-96.js";/* empty css */import{t as f}from"./bf-374-48.js";import{T as F}from"./bf-60-114.js";import{A as P}from"./bf-490-110.js";import{b as U,s as _}from"./bf-55-93.js";import"./bf-570-115.js";import"./bf-331-47.js";import"./bf-781-46.js";import"./bf-798-54.js";import"./bf-425-69.js";function G({formID:n,signConf:t,setSignConf:s,step:g,setstep:z,isLoading:m,setisLoading:h,setSnackbar:p,redirectLocation:u,isInfo:i,authorizedAction:x}){const o=T(I),{siteURL:j}=o,[l,v]=r.useState(!1),[c,N]=r.useState({dataCenter:"",clientId:"",clientSecret:""}),d=b=>{const y=S({},t),k=S({},c);k[b.target.name]="",y[b.target.name]=b.target.value,N(k),s(y)};return r.useEffect(()=>{l&&x()},[l]),e.jsxs(e.Fragment,{children:[e.jsx(F,{title:f.zohoSign.title,youTubeLink:f.zohoSign.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("Account Name:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"name",value:t.name,type:"text",placeholder:a("e.g. Marketing — work account"),disabled:i}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Data Center:")})}),e.jsxs("select",{onChange:d,name:"dataCenter",value:t.dataCenter,className:"btcd-paper-inp w-6 mt-1",disabled:i,children:[e.jsx("option",{value:"",children:a("--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:c.dataCenter}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Homepage URL:")})}),e.jsx(C,{value:j,className:"field-key-cpy w-6 ml-0",readOnly:i}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Authorized Redirect URIs:")})}),e.jsx(C,{value:u||`${o.zohoRedirectURL}`,className:"field-key-cpy w-6 ml-0",readOnly:i}),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://api-console.zoho.${(t==null?void 0:t.dataCenter)||"com"}/`,target:"_blank",rel:"noreferrer",children:a("Zoho 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:d,name:"clientId",value:t.clientId,type:"text",placeholder:a("Client id..."),disabled:i}),e.jsx("div",{style:{color:"red"},children:c.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:d,name:"clientSecret",value:t.clientSecret,type:"text",placeholder:a("Client secret..."),disabled:i}),e.jsx("div",{style:{color:"red"},children:c.clientSecret}),!i&&e.jsxs(e.Fragment,{children:[e.jsx(P,{isAuthorized:l,isLoading:m,handleAuthorize:()=>U(t,s,N,v,h,p)}),e.jsx("br",{})]})]})]})}function ee({formFields:n,setIntegration:t,integrations:s,allIntegURL:g}){const z=Z(),{formID:m}=$(),[h,p]=r.useState(!1),[u,i]=r.useState(1),[x,o]=r.useState({show:!1}),[j,l]=r.useState({name:"Zoho Sign API",type:"Zoho Sign",clientId:"",clientSecret:""}),v=()=>{setTimeout(()=>{z(g)},1e3)};return r.useEffect(()=>{window.opener&&_("zohoSign")},[]),e.jsxs("div",{children:[e.jsx(D,{snack:x,setSnackbar:o}),e.jsx(G,{formID:m,signConf:j,setSignConf:l,step:u,setstep:i,isLoading:h,setisLoading:p,setSnackbar:o,authorizedAction:v})]})}export{ee as default}; |