import{j as s,a1 as x,ar as c,ao as u,I as g}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b710.js";import{b9 as h,q as v}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b723.js";import{u as j}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b719.js";import{u as f}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b7103.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b718.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b76.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b74.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b7.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b78.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b75.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b77.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b79.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b72.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b73.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b7123.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b728.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 k({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{k as default};
