File: /var/www/html/wordpress/wp-content/plugins/bit-integrations/assets/bi.471.120.js
import{u as w,o as I,e as p,f as S,r as m,j as t}from"./main-685.js";import{e as v,$ as _,f as N,_ as o}from"./bi.878.0.js";import{S as y}from"./bi.674.13.js";import"./bi.451.455.js";import{S as F,I as k,s as E}from"./bi.776.3.js";import{M as $}from"./bi.210.928.js";import{h as l,c as L}from"./bi.702.929.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:u}){const g=w(),{formID:f}=I(),[e,a]=p(v),[c,P]=p(_),d=S(N),[r,n]=m.useState(!1),[x,s]=m.useState({show:!1}),[h,j]=m.useState((e==null?void 0:e.name)||""),b=()=>{if(!L(e)){s({show:!0,msg:o("Please map all required fields to continue.","bit-integrations")});return}if(!(e!=null&&e.name)){s({show:!0,msg:o("Please integrations name is required.","bit-integrations")});return}E({flow:c,allIntegURL:u,conf:e,navigate:g,edit:1,setIsLoading:n,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(y,{snack:x,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:o("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:i=>{j(i.target.value),l(i,e,a,n)},name:"name",value:h,type:"text",placeholder:o("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(F,{entity:c.triggered_entity,setSnackbar:s}),t.jsx($,{formID:f,formFields:d,handleInput:i=>l(i,e,a,n),mailMintConf:e,setMailMintConf:a,isLoading:r,setIsLoading:n,setSnackbar:s}),t.jsx(k,{edit:!0,saveConfig:b,disabled:!(e!=null&&e.mainAction)||!(e!=null&&e.name)||r,isLoading:r,dataConf:e,setDataConf:a,formFields:d}),t.jsx("br",{})]})}export{K as default};