import{j as s,$ as x,am as c,ak as u,I as g}from"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e410.js";import{b9 as h,q as v}from"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e423.js";import{u as j}from"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e419.js";import{u as f}from"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e4104.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e418.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e46.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e48.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e44.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e4.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e45.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e47.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e49.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e42.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e43.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e4124.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e428.js";const N=()=>{const{importedContacts:a}=h.getState();if(!(a!=null&&a.length))return[];const n=new Set(["Labels","Photo","imported","Unnamed: 2","id","","name","nomes","numeros"]),o=[];return a.forEach(t=>{Object.keys(t).forEach(i=>{!n.has(i)&&!o.includes(i)&&o.push(i)})}),o};function L({acaoModel:a}){const{close:n}=v.getState(),{getVariaveis:o}=f.getState(),t=j(e=>e.language),i=a==="useAcaoEnvioEmMassa",m=a==="useAcaoEnvioEmMassaNew",l=m?N():o(),d=["#nome","#primeiroNome","#numero","#periodo-dia","#saudação","#mencionar-todos"],p=["#sexo","#data_nascimento","#idioma","#email","#cidade","#estado","#origem","#data_entrada","#data_saida","#valor_negocio","#empresa","#cargo","#produtos_de_interesse","#observações"],r=e=>{u(e),g({type:"Success",message:`${t.tag} ${e} ${t.Copiada}`,position:"top-right"}),n()};return s.jsxs("div",{className:"px-3",children:[s.jsx(x,{weight:"700",children:t.tagsDisponiveis}),s.jsx("hr",{className:"mt-1"}),s.jsxs("div",{className:"flex gap-4 mt-2",children:[s.jsx("div",{children:s.jsx("ul",{className:"mt-3 p-[1px]",children:d.map(e=>s.jsx(c,{className:"text-base truncate !w-[200px]",content:e,icon:s.jsx(s.Fragment,{}),setFunction:()=>r(e)},e))})}),(i||m)&&l.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"badge badge-warning text-[var(--letra)]",children:t.envioMassa}),s.jsx("ul",{className:"mt-3 overflow-y-auto overflow-x-hidden p-[1px]",style:{maxHeight:"calc(100vh - 282px)"},children:l.map(e=>s.jsx(c,{className:"text-base truncate !w-[200px]",content:"#"+e,icon:s.jsx(s.Fragment,{}),setFunction:()=>r("#"+e)},e))})]}),s.jsxs("div",{children:[s.jsx("div",{className:"badge badge-accent text-[var(--letra)]",children:t.profileContact}),s.jsx("ul",{className:"mt-3 p-[1px]",children:p.map(e=>s.jsx(c,{className:"text-base truncate !w-[200px]",content:e,icon:s.jsx(s.Fragment,{}),setFunction:()=>r(e)},e))})]})]})]})}export{L as default};
