var w=Object.defineProperty;var m=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var u=(i,t,s)=>t in i?w(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s,n=(i,t)=>{for(var s in t||(t={}))C.call(t,s)&&u(i,s,t[s]);if(m)for(var s of m(t))_.call(t,s)&&u(i,s,t[s]);return i};import{u as k,k as E,d as f,h as F,r as o,j as e}from"./main-406.js";import{g as V,$ as y,h as L,d as N,i as $,_ as x,L as R,s as I}from"./bi.394.85.js";import{c as z,C as A}from"./bi.954.848.js";import M from"./bi.651.294.js";function H({allIntegURL:i}){const t=k();E();const[s,d]=f(V),[c,p]=f(y),h=F(L),[a,v]=o.useState({}),[b,j]=o.useState(!1),[g,l]=o.useState({show:!1}),[S,P]=o.useState(1);return o.useEffect(()=>{const r=n({},s);delete r.isValid,d(n({},r))},[s==null?void 0:s.value]),e.jsxs("div",{children:[e.jsx(N,{snack:g,setSnackbar:l}),e.jsx($,{entity:c.triggered_entity,setSnackbar:l}),e.jsx("div",{className:"mt-3",children:e.jsxs("div",{className:"btcd-stp-page",style:n({},S===1&&{width:"91%",height:"auto",overflow:"visible"}),children:[e.jsx("h1",{children:"custom action"}),e.jsx(M,{customActionConf:s,setCustomActionConf:d,formFields:h}),e.jsxs("button",{onClick:()=>z(s,d,a,v),disabled:!s.value||(a==null?void 0:a.validate),className:"btn f-left btcd-btn-lg purple sh-sm flx mt-5",type:"button",children:[s!=null&&s.isValid&&!(a!=null&&a.validate)?x("Validated ✔","bit-integrations"):x("Validated","bit-integrations"),(a==null?void 0:a.validate)&&e.jsx(R,{size:"20",clr:"#022217",className:"ml-2"})]})]})}),e.jsx(A,{edit:!0,saveConfig:()=>I({flow:c,setFlow:p,allIntegURL:i,conf:s,navigate:t,edit:1,setIsLoading:j,setSnackbar:l}),isLoading:b,disabled:!s.isValid}),e.jsx("br",{})]})}export{H as default};
