| 1 |
var E=Object.defineProperty;var v=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var g=(l,t,a)=>t in l?E(l,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[t]=a,d=(l,t)=>{for(var a in t||(t={}))S.call(t,a)&&g(l,a,t[a]);if(v)for(var a of v(t))I.call(t,a)&&g(l,a,t[a]);return l};import{u as L,r as N,j as e,_ as s,C as y,$}from"./main-162.js";import{t as z}from"./bf-307-196.js";import{T as P}from"./bf-23-135.js";import{A as U}from"./bf-272-398.js";import{N as _}from"./bf-823-399.js";import{i as B,g as D}from"./bf-854-340.js";/* empty css */import"./bf-875-77.js";import"./bf-230-72.js";import"./bf-917-73.js";import"./bf-644-69.js";function X({formID:l,crmConf:t,setCrmConf:a,step:c,setstep:A,isLoading:w,setisLoading:h,setSnackbar:m,redirectLocation:R,isInfo:i}){const p=L($),{siteURL:k}=p,[x,T]=N.useState(!1),[r,u]=N.useState({dataCenter:"",clientId:"",clientSecret:""}),C=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),A(2),!t.module&&D(l,t,a,h,m)},n=o=>{const j=d({},t),b=d({},r);b[o.target.name]="",j[o.target.name]=o.target.value,u(b),a(j)};return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:z.zohoCrm.title,youTubeLink:z.zohoCrm.link}),e.jsxs("div",{className:"btcd-stp-page",style:{width:c===1&&900,height:c===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:n,name:"name",value:t.name,type:"text",placeholder:s("Integration Name..."),disabled:i}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Data Center:")})}),e.jsxs("select",{onChange:n,name:"dataCenter",value:t.dataCenter,className:"btcd-paper-inp w-6 mt-1",disabled:i,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:r.dataCenter}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Homepage URL:")})}),e.jsx(y,{value:k,className:"field-key-cpy w-6 ml-0",readOnly:i}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Authorized Redirect URIs:")})}),e.jsx(y,{value:R||`${p.zohoRedirectURL}`,className:"field-key-cpy w-6 ml-0",readOnly:i}),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:n,name:"clientId",value:t.clientId,type:"text",placeholder:s("Client id..."),disabled:i}),e.jsx("div",{style:{color:"red"},children:r.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:n,name:"clientSecret",value:t.clientSecret,type:"text",placeholder:s("Client secret..."),disabled:i}),e.jsx("div",{style:{color:"red"},children:r.clientSecret}),!i&&e.jsxs(e.Fragment,{children:[e.jsx(U,{isAuthorized:x,isLoading:w,handleAuthorize:()=>B(t,a,u,T,h,m)}),e.jsx("br",{}),e.jsx(_,{nextPageHandler:()=>C(),disabled:!x})]})]})]})}export{X as default}; |