var o=Object.defineProperty;var u=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;var c=(s,t,e)=>t in s?o(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,d=(s,t)=>{for(var e in t||(t={}))f.call(t,e)&&c(s,e,t[e]);if(u)for(var e of u(t))p.call(t,e)&&c(s,e,t[e]);return s};import{c as g,V as F,_ as n}from"./main-634.js";const m=(s,t,e,i)=>{const a=d({},t),{name:r}=s.target;s.target.value!==""?a[r]=s.target.value:delete a[r],e(d({},a))},y=s=>!((s!=null&&s.field_map?s.field_map.filter(e=>!e.formField||!e.elasticEmailField||!e.formField==="custom"&&!e.customValue):[]).length>0),L=s=>{const t=s==null?void 0:s.elasticEmailFields.filter(e=>e.required===!0);return t.length>0?t.map(e=>({formField:"",elasticEmailField:e.key})):[{formField:"",elasticEmailField:""}]},k=(s,t,e)=>{e(!0);const i={apiKey:s.api_key},a=g(i,"bitforms_get_all_lists").then(r=>{if(r&&r.success){const l=d({},s);return l.default||(l.default={}),r.data.lists&&(l.default.lists=r.data.lists),t(d({},l)),e(!1),"List refreshed successfully"}return e(!1),"List refresh failed. please try again"});F.promise(a,{success:r=>r,error:n("Error Occurred"),loading:n("Loading Lists...")})};export{L as a,y as c,k as g,m as h};
