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