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