import{h as l,g as I,$ as b,k as w,i as _,j as e,_ as c}from"./main.2.9.0.js";import{u as v,e as N,b as i}from"./react-router.DMwpH23k.js";import{S as C}from"./SnackMsg.DYSD96P4.js";import{S as k,I as y,s as E}from"./Integrations.DL8wqGct.js";import{h as f}from"./GoogleSheetCommonFunc.CYTaCOIe.js";import{G as F}from"./GoogleSheetIntegLayout.CSAwzv1g.js";import"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./GoogleIntegrationHelpers.C5BmN2Z3.js";import"./TagifyInput.KPPRQJ1B.js";import"./lodash.DCvQBX3r.js";function Q({allIntegURL:g}){const x=v(),{id:$,formID:r}=N(),[t,a]=l(I),[m,h]=l(b),[d,n]=i.useState(!1),[u,s]=i.useState({show:!1}),p=w(_),[j,S]=i.useState((t==null?void 0:t.name)||"");return e.jsxs("div",{style:{width:900},children:[e.jsx(C,{snack:u,setSnackbar:s}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:c("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:o=>{S(o.target.value),f(o,t,a)},name:"name",value:j,type:"text",placeholder:c("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(k,{entity:m.triggered_entity,setSnackbar:s}),e.jsx(F,{formID:r,formFields:p,handleInput:o=>f(o,t,a,r,n,s),sheetConf:t,setSheetConf:a,isLoading:d,setIsLoading:n,setSnackbar:s}),e.jsx(y,{edit:!0,saveConfig:()=>E({flow:m,setFlow:h,allIntegURL:g,conf:t,navigate:x,edit:1,setIsLoading:n,setSnackbar:s}),disabled:t.spreadsheetId===""||t.worksheetName===""||t.field_map.length<1,isLoading:d,dataConf:t,setDataConf:a,formFields:p}),e.jsx("br",{})]})}export{Q as default};
