import{u as I,k as _,d,r as o,h as w,j as e}from"./main-333.js";import{$ as C,g as F,h as v,d as y,_ as r,i as S,I as N,s as k}from"./bi.636.93.js";import{h as m,c}from"./bi.38.887.js";import{A}from"./bi.741.888.js";import"./bi.535.730.js";import"./bi.286.731.js";function T({allIntegURL:f}){const g=I();_();const[i,E]=d(C),[t,a]=d(F),[p,u]=o.useState(!1),[x,b]=o.useState({auth:!1,customFields:!1,bases:!1,tables:!1,airtableFields:!0}),[h,s]=o.useState({show:!1}),l=w(v),j=()=>{if(!c(t)){s({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}k({flow:i,allIntegURL:f,conf:t,navigate:g,edit:1,setIsLoading:u,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(y,{snack:h,setSnackbar:s}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:r("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:n=>m(n,t,a),name:"name",value:t.name,type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(S,{entity:i.triggered_entity,setSnackbar:s}),e.jsx(A,{formID:i.triggered_entity_id,formFields:l,handleInput:n=>m(n,t,a),airtableConf:t,setAirtableConf:a,loading:x,setLoading:b,setSnackbar:s}),e.jsx(N,{edit:!0,saveConfig:j,disabled:!c(t),isLoading:p,dataConf:t,setDataConf:a,formFields:l}),e.jsx("br",{})]})}export{T as default};
