File: /var/www/html/wordpress/wp-content/plugins/bit-integrations/assets/bi.583.15.js
import{u as S,o as j,e as l,r as o,f as _,j as e}from"./main-685.js";import{$ as b,e as I,f as w,_ as r}from"./bi.878.0.js";import{S as C}from"./bi.674.13.js";import"./bi.451.455.js";import{S as v,I as y,s as F}from"./bi.776.3.js";import{h as f,c as N}from"./bi.365.747.js";import{O as k}from"./bi.753.748.js";import"./bi.327.9.js";import"./bi.601.11.js";import"./bi.825.14.js";import"./bi.684.749.js";import"./bi.463.750.js";import"./bi.768.751.js";import"./bi.666.752.js";function K({allIntegURL:p}){const c=S();j();const[n,E]=l(b),[t,a]=l(I),[g,L]=o.useState(!1),[u,m]=o.useState({list:!1,field:!1,auth:!1,group:!1}),[x,s]=o.useState({show:!1}),d=_(w),h=()=>{if(!N(t)){s({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}F({flow:n,allIntegURL:p,conf:t,navigate:c,edit:1,setLoading:m,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(C,{snack:x,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:i=>f(i,t,a),name:"name",value:t.name,type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(v,{entity:n.triggered_entity,setSnackbar:s}),e.jsx(k,{formID:n.triggered_entity_id,formFields:d,handleInput:i=>f(i,t,a),omniSendConf:t,setOmniSendConf:a,loading:u,setLoading:m,setSnackbar:s}),e.jsx(y,{edit:!0,saveConfig:h,disabled:t.field_map.length<1,isLoading:g,dataConf:t,setDataConf:a,formFields:d}),e.jsx("br",{})]})}export{K as default};