import{h as l,g as I,$ as b,k as w,i as _,j as e,_ as c}from"./main.2.8.10.js";import{u as v,e as N,b as i}from"./react-router.DMwpH23k.js";import{S as C}from"./SnackMsg.7BjcJK1j.js";import{S as k,I as y,s as E}from"./Integrations.BFhED4ck.js";import{h as f}from"./GoogleSheetCommonFunc.tmVkP4MP.js";import{G as F}from"./GoogleSheetIntegLayout.B37vCjST.js";import"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./GoogleIntegrationHelpers.CQstGYRP.js";import"./TagifyInput.C4ilRm4k.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};
