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