import{h as m,$ as b,g as j,k as w,i as k,j as e,_ as o}from"./main.2.9.0.js";import{u as C,e as I,b as i}from"./react-router.DMwpH23k.js";import{S as _}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as v,I as F,s as y}from"./Integrations.DL8wqGct.js";import{h as N,c as d}from"./ZohoSheetCommonFunc.D6FDE5kv.js";import{Z as E}from"./ZohoSheetIntegLayout.B5O8TPpc.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TagifyInput.KPPRQJ1B.js";import"./lodash.DCvQBX3r.js";function K({allIntegURL:l}){const c=C(),{id:L}=I(),[n,Z]=m(b),[t,a]=m(j),[f,p]=i.useState(!1),[h,g]=i.useState({auth:!1,header:!1,workbooks:!1,worksheets:!1,workSheetHeaders:!0}),[u,s]=i.useState({show:!1}),r=w(k),x=()=>{if(!d(t)){s({show:!0,msg:o("Please map mandatory fields","bit-integrations")});return}y({flow:n,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:n.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:!d(t),isLoading:f,dataConf:t,setDataConf:a,formFields:r}),e.jsx("br",{})]})}export{K as default};
