import{aj as u,af as p}from"./v_7_4_3_72_6a457bf5-eeae-4570-8821-bd6fa39c892625.js";import{S as f,r as l,G as d}from"./v_7_4_3_72_6a457bf5-eeae-4570-8821-bd6fa39c89264.js";import"./v_7_4_3_72_6a457bf5-eeae-4570-8821-bd6fa39c89265.js";import{c as m}from"./v_7_4_3_72_6a457bf5-eeae-4570-8821-bd6fa39c89262.js";const v=m()((s,E)=>({activeMenu:"Envio Rápido",setActiveMenu:a=>s({activeMenu:a}),viewContatos:{isOpen:!1,type:"create",content:[]},setViewContatos:a=>s({viewContatos:a}),setAcaoEnvioEmMassa:a=>{const{acao:i}=u.getState(),{getAction:e}=p.getState();let t=[];const n=r=>{let o=[];for(let c of e(r))o.push({...c,id:l()});t.push(...o)};if(a.type==="script")for(let r of a.script)n(r.id);else n(a.id);u.setState({acao:[...i,...t]})},assinatura:{desativar:!1,personalizar:!1,nome:""},setAssinatura:(a,i)=>s(e=>{let t=e.assinatura;return a==="desativar"&&i?t={...e.assinatura,desativar:!0,personalizar:!1}:a==="personalizar"&&i?t={...e.assinatura,personalizar:!0,desativar:!1}:t={...e.assinatura,[a]:i},f("envioEmMassa-assinatura","assinatura",[t]),{assinatura:t}})}));(async()=>{const s=await d("envioEmMassa-assinatura","assinatura");s&&s[0]&&s[0][0]&&v.setState({assinatura:s[0][0]})})();export{v as u};
