File: /var/www/html/wordpress/wp-content/plugins/bit-integrations/assets/bi.217.129.js
import{u as b,o as C,e as d,r,f as I,j as t}from"./main-685.js";import{$ as _,e as w,f as v,_ as i,k as y}from"./bi.878.0.js";import{S as F}from"./bi.674.13.js";import"./bi.451.455.js";import{S as N,I as k,s as E}from"./bi.776.3.js";import{h as c,c as f}from"./bi.954.946.js";import{S as L}from"./bi.535.947.js";import"./bi.327.9.js";import"./bi.601.11.js";import"./bi.825.14.js";function H({allIntegURL:p}){const g=b();C();const[n,P]=d(_),[e,a]=d(w),[u,x]=r.useState(!1),[h,m]=r.useState({}),[S,s]=r.useState({show:!1}),l=I(v),j=()=>{if(!f(e)){s({show:!0,msg:i("Please map mandatory fields","bit-integrations")});return}if(e.actionName==="lead"&&!e.selectedCRMPipeline){y.error(i("Please select a pipeline","bit-integrations"));return}E({flow:n,allIntegURL:p,conf:e,navigate:g,edit:1,setLoading:m,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(F,{snack:S,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:i("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:o=>c(o,e,a),name:"name",value:e.name,type:"text",placeholder:i("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(N,{entity:n.triggered_entity,setSnackbar:s}),t.jsx(L,{formID:n.triggered_entity_id,formFields:l,handleInput:o=>c(o,e,a),salesmateConf:e,setSalesmateConf:a,loading:h,setLoading:m,setIsLoading:x,setSnackbar:s}),t.jsx(k,{edit:!0,saveConfig:j,disabled:!f(e),isLoading:u,dataConf:e,setDataConf:a,formFields:l}),t.jsx("br",{})]})}export{H as default};