| 1 |
var M=Object.defineProperty;var g=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var j=(o,t,e)=>t in o?M(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,S=(o,t)=>{for(var e in t||(t={}))y.call(t,e)&&j(o,e,t[e]);if(g)for(var e of g(t))C.call(t,e)&&j(o,e,t[e]);return o};import{F as k,g as A,r,j as s,M as _,_ as c,S as z}from"./main-294.js";import{s as E}from"./bf-500-198.js";import{I as T}from"./bf-906-183.js";import{G as $,h as w}from"./bf-107-115.js";import{G as D}from"./bf-380-199.js";import"./bf-582-82.js";import"./bf-813-81.js";import"./bf-158-107.js";import"./bf-176-80.js";import"./bf-867-113.js";import"./bf-274-200.js";function W({formFields:o,setIntegration:t,integrations:e,allIntegURL:m}){const u=k(),{id:f,formID:p}=A(),[b,d]=r.useState(!1),[I,N]=r.useState(1),[a,i]=r.useState(S({},e[f])),[x,l]=r.useState(!1),[v,n]=r.useState({show:!1}),G=()=>{setTimeout(()=>{u(`${m}/new/${a.type}`)},1e3),d(!1)};return s.jsxs("div",{style:{width:900},children:[s.jsx(_,{title:c("Authorize New Google App"),show:b,setModal:()=>d(!1),children:s.jsx($,{formID:p,sheetConf:a,setSheetConf:i,step:I,setstep:N,setSnackbar:n,isLoading:x,setisLoading:l,allIntegURL:m,authorizedAction:G})}),s.jsx(z,{snack:v,setSnackbar:n}),s.jsxs("div",{className:"flx mt-3",children:[s.jsx("b",{className:"wdt-150 d-in-b",children:c("Integration Name:")}),s.jsx("input",{className:"btcd-paper-inp w-6",onChange:h=>w(h,a,i),name:"name",value:a.name,type:"text",placeholder:c("Integration Name...")})]}),s.jsx("br",{}),s.jsx("br",{}),s.jsx(D,{formID:p,formFields:o,handleInput:h=>w(h,a,i,p,l,n),sheetConf:a,setSheetConf:i,isLoading:x,setisLoading:l,setSnackbar:n,setShowMdl:d}),s.jsx(T,{edit:!0,saveConfig:()=>E(e,t,m,a,u,f,1),disabled:a.spreadsheetId===""||a.worksheetName===""||a.field_map.length<1}),s.jsx("br",{})]})}export{W as default}; |