| 1 |
import{v as S,t as j,r,j as t,S as C,_ as I}from"./main-162.js";/* empty css */import{S as w}from"./bf-23-135.js";import{a as v,b as y}from"./bf-230-72.js";import{I as Z}from"./bf-283-330.js";import{N as k}from"./bf-823-399.js";import N from"./bf-657-254.js";import{h as P,c as b}from"./bf-771-338.js";import{Z as E}from"./bf-57-339.js";import"./bf-875-77.js";import"./bf-307-196.js";import"./bf-917-73.js";import"./bf-644-69.js";import"./bf-272-398.js";import"./bf-298-76.js";import"./bf-518-333.js";import"./bf-361-122.js";import"./bf-527-130.js";function U({formFields:c,setIntegration:d,integrations:l,allIntegURL:f}){const h=S(),{formID:a}=j(),[m,i]=r.useState(!1),[e,p]=r.useState(1),[u,o]=r.useState({show:!1}),[s,n]=r.useState({name:"Zoho Creator API",type:"Zoho Creator",clientId:"",clientSecret:"",accountOwner:"",field_map:[{formField:"",zohoFormField:""}],actions:{}});r.useEffect(()=>{window.opener&&v("zohoCreator")},[]);const x=()=>{if(setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),!b(s)){o({show:!0,msg:I("Please map mandatory fields")});return}p(3)};return t.jsxs("div",{children:[t.jsx(C,{snack:u,setSnackbar:o}),t.jsx("div",{className:"txt-center w-9 mt-2 cal-width",children:t.jsx(w,{step:3,active:e})}),t.jsx(N,{formID:a,creatorConf:s,setCreatorConf:n,step:e,setStep:p,isLoading:m,setisLoading:i,setSnackbar:o}),t.jsxs("div",{className:"btcd-stp-page",style:{width:e===2&&900,height:e===2&&"100%"},children:[t.jsx(E,{formID:a,formFields:c,handleInput:g=>P(g,s,n,a,i,o),creatorConf:s,setCreatorConf:n,isLoading:m,setisLoading:i,setSnackbar:o}),t.jsx(k,{nextPageHandler:()=>x()})]}),t.jsx(Z,{step:e,saveConfig:()=>y(l,d,f,s,h)})]})}export{U as default}; |