import{b as d,$ as b,h as j,k as w,i as k,j as e,_ as o}from"./main.2.8.1.js";import{u as C,h as I,d as n}from"./react-router-dom.9mCuUg3q.js";import{S as _}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as v,I as F,s as y}from"./Integrations.D2bgBas2.js";import{h as N,c as m}from"./ZohoSheetCommonFunc.Mi59-eT_.js";import{Z as E}from"./ZohoSheetIntegLayout.C8rVzJEw.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function J({allIntegURL:l}){const c=C(),{id:L}=I(),[i,Z]=d(b),[t,a]=d(j),[f,p]=n.useState(!1),[h,g]=n.useState({auth:!1,header:!1,workbooks:!1,worksheets:!1,workSheetHeaders:!0}),[u,s]=n.useState({show:!1}),r=w(k),x=()=>{if(!m(t)){s({show:!0,msg:o("Please map mandatory fields","bit-integrations")});return}y({flow:i,allIntegURL:l,conf:t,navigate:c,edit:1,setIsLoading:p,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(_,{snack:u,setSnackbar:s}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:o("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:S=>N(S,t,a),name:"name",value:t.name,type:"text",placeholder:o("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(v,{entity:i.triggered_entity,setSnackbar:s}),e.jsx(E,{formFields:r,zohoSheetConf:t,setZohoSheetConf:a,loading:h,setLoading:g,setSnackbar:s}),e.jsx(F,{edit:!0,saveConfig:x,disabled:!m(t),isLoading:f,dataConf:t,setDataConf:a,formFields:r}),e.jsx("br",{})]})}export{J as default};
