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