import{b as p,h as I,$ as b,k as w,i as _,j as e,_ as c}from"./main.2.8.1.js";import{u as v,h as N,d as i}from"./react-router-dom.9mCuUg3q.js";import{S as C}from"./SnackMsg.S8DrwLlT.js";import{S as k,I as y,s as E}from"./Integrations.D2bgBas2.js";import{h as f}from"./GoogleSheetCommonFunc.RFhGkHnX.js";import{G as F}from"./GoogleSheetIntegLayout.fMoxTzIV.js";import"./Note.BeM7sN-p.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./GoogleIntegrationHelpers.BGadhjz3.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function K({allIntegURL:g}){const h=v(),{id:$,formID:r}=N(),[t,a]=p(I),[m,x]=p(b),[d,n]=i.useState(!1),[u,s]=i.useState({show:!1}),l=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:l,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:x,allIntegURL:g,conf:t,navigate:h,edit:1,setIsLoading:n,setSnackbar:s}),disabled:t.spreadsheetId===""||t.worksheetName===""||t.field_map.length<1,isLoading:d,dataConf:t,setDataConf:a,formFields:l}),e.jsx("br",{})]})}export{K as default};
