import{u as l}from"./Note.DalStCGz.js";import{_ as m,b as u}from"./main.2.8.10.js";const d=(e,a,t)=>{const n=l(a,r=>{r[e.target.name]=e.target.value});t(n)},f=e=>{const a=e.filter(t=>t.required===!0);return a.length>0?a.map(t=>({formField:"",wpcafeField:t.key})):[{formField:"",wpcafeField:""}]},F=e=>!((e!=null&&e.field_map?e.field_map.filter(t=>!t.formField||!t.wpcafeField||!t.formField==="custom"&&!t.customValue):[]).length>0),h=(e,a,t,n,r)=>{if(!e.name){t({name:e.name?"":m("Integration name cann't be empty","bit-integrations")});return}t({}),r(!0);const i={name:e.name};u(i,"wpcafe_authorize").then(s=>{s&&s.success&&n(!0),r(!1)})};export{F as c,f as g,d as h,h as w};
