var o=Object.defineProperty;var m=Object.getOwnPropertySymbols;var c=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var u=(a,i,e)=>i in a?o(a,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[i]=e,r=(a,i)=>{for(var e in i||(i={}))c.call(i,e)&&u(a,e,i[e]);if(m)for(var e of m(i))h.call(i,e)&&u(a,e,i[e]);return a};import{b as p,j as d}from"./bi.394.85.js";const _=(a,i,e)=>{const t=r({},i);t.name=a.target.value,e(r({},t))},q=(a,i,e,t)=>{const f={account_id:a.account_id,api_key:a.api_key};p(f,"lemlist_campaigns").then(s=>{if(s&&s.success){const l=r({},a);s.data?(l.default||(l.default={}),l.default.lemlistCampaigns=s.data,t({show:!0,msg:d("Lemlist Campaigns refreshed","bit-integrations")})):t({show:!0,msg:d("No Lemlist campaigns found. Try changing the header row number or try again","bit-integrations")}),i(r({},l))}else t({show:!0,msg:d("Lemlist campaigns refresh failed. please try again","bit-integrations")});e(!1)}).catch(()=>e(!1))},w=(a,i,e,t)=>{const f=[{fieldValue:"email",fieldName:"Email",required:!0},{fieldValue:"firstName",fieldName:"First Name",required:!1},{fieldValue:"lastName",fieldName:"Last Name",required:!1},{fieldValue:"companyName",fieldName:"Company Name",required:!1},{fieldValue:"phone",fieldName:"Phone",required:!1}],s=r({},a);s.default||(s.default={}),s.default.fields=f;const{fields:l}=s.default;s.field_map=Object.values(l).filter(n=>n.required).map(n=>({formField:"",lemlistField:n.fieldValue,required:!0})),t({show:!0,msg:d("Lemlist fields refreshed","bit-integrations")}),i(r({},s)),e(!1)},F=a=>!((a!=null&&a.field_map?a.field_map.filter(e=>!e.formField&&e.lemlistField&&e.required):[]).length>0);export{w as a,F as c,_ as h,q as r};
