File: /var/www/html/wordpress/wp-content/plugins/bit-integrations/assets/bi.245.62.js
import{o as j,u as w,e as c,r as l,f as k,j as e}from"./main-685.js";import{e as I,$ as _,f as C,_ as o}from"./bi.878.0.js";import{S}from"./bi.674.13.js";import"./bi.451.455.js";import{S as v,I as y,s as N}from"./bi.776.3.js";import{h as p,c as D}from"./bi.457.822.js";import{Z as F}from"./bi.652.823.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 H({allIntegURL:f}){const{id:E,formID:r}=j(),g=w(),[t,n]=c(I),[m,u]=c(_),[x,i]=l.useState(!1),[h,s]=l.useState({show:!1}),d=k(C),b=()=>{var a;if(!D(t)){s({show:!0,msg:o("Please map mandatory fields","bit-integrations")});return}if(!((a=t.actions)!=null&&a.ticket_owner)){s({show:!0,msg:o("Please select a ticket owner","bit-integrations")});return}N({flow:m,setFlow:u,allIntegURL:f,conf:t,navigate:g,edit:1,setIsLoading:i,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(S,{snack:h,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-7",onChange:a=>p(a,t,n),name:"name",value:t.name,type:"text",placeholder:o("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx(v,{entity:m.triggered_entity,setSnackbar:s}),e.jsx(F,{formID:r,formFields:d,handleInput:a=>p(a,t,n,r,i,s),deskConf:t,setDeskConf:n,isLoading:x,setIsLoading:i,setSnackbar:s}),e.jsx(y,{edit:!0,saveConfig:b,disabled:t.department===""||t.table===""||t.field_map.length<1,dataConf:t,setDataConf:n,formFields:d})]})}export{H as default};