import{u as w,k as S,d,r as o,h as b,j as e}from"./main-406.js";import{$ as k,g as C,h as I,d as _,_ as n,i as v,I as F,s as y}from"./bi.394.85.js";import{h as N,c as l}from"./bi.132.866.js";import{Z as E}from"./bi.177.867.js";import"./bi.704.707.js";import"./bi.701.708.js";function A({allIntegURL:c}){const m=w();S();const[i,L]=d(k),[t,a]=d(C),[f,h]=o.useState(!1),[g,p]=o.useState({auth:!1,header:!1,workbooks:!1,worksheets:!1,workSheetHeaders:!0}),[u,s]=o.useState({show:!1}),r=b(I),x=()=>{if(!l(t)){s({show:!0,msg:n("Please map mandatory fields","bit-integrations")});return}y({flow:i,allIntegURL:c,conf:t,navigate:m,edit:1,setIsLoading:h,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(_,{snack:u,setSnackbar:s}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:n("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:j=>N(j,t,a),name:"name",value:t.name,type:"text",placeholder:n("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(v,{entity:i.triggered_entity,setSnackbar:s}),e.jsx(E,{formFields:r,zohoSheetConf:t,setZohoSheetConf:a,loading:g,setLoading:p,setSnackbar:s}),e.jsx(F,{edit:!0,saveConfig:x,disabled:!l(t),isLoading:f,dataConf:t,setDataConf:a,formFields:r}),e.jsx("br",{})]})}export{A as default};
