import{b as o,h as b,$ as I,k as g,i as w,j as s,_ as r}from"./main.2.8.1.js";import{u as _,h as S,d as m}from"./react-router-dom.9mCuUg3q.js";import{S as v}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as N,I as k,s as y}from"./Integrations.D2bgBas2.js";import{h as F,c as E}from"./GoogleCalendarCommonFunc.BXw6Q4e1.js";import{G}from"./GoogleCalendarIntegLayout.BCNYU5b-.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";import"./TitleModal.OGRirA3t.js";import"./EditIcn.VNtuoqcJ.js";function J({allIntegURL:c}){const d=_(),{id:p}=S(),[t,e]=o(b),[i,l]=o(I),n=g(w),[x,f]=m.useState(!1),[u,a]=m.useState({show:!1}),h=()=>{y({flow:i,setFlow:l,allIntegURL:c,conf:t,navigate:d,edit:1,setIsLoading:f,setSnackbar:a})};return s.jsxs("div",{style:{width:900},className:"p-2",children:[s.jsx(v,{snack:u,setSnackbar:a}),s.jsxs("div",{className:"flx mt-3",children:[s.jsx("b",{className:"wdt-200 d-in-b",children:r("Integration Name:","bit-integrations")}),s.jsx("input",{className:"btcd-paper-inp w-5",onChange:j=>F(j,t,e),name:"name",value:t.name,type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),s.jsx("br",{}),s.jsx("br",{}),s.jsx(N,{entity:i.triggered_entity,setSnackbar:a}),s.jsx(G,{flowID:p,formFields:n,googleCalendarConf:t,setGoogleCalendarConf:e}),s.jsx(k,{edit:!0,saveConfig:h,disabled:!(t!=null&&t.calendarId)||!(t!=null&&t.timeZone)||!E(t==null?void 0:t.field_map),isLoading:x,dataConf:t,setDataConf:e,formFields:n}),s.jsx("br",{})]})}export{J as default};
