import{aC as u,O as p}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7124.js";import{S as l,r as f,G as d}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7111.js";import{c as m}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a718.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 r=n=>{let o=[];for(let c of e(n))o.push({...c,id:f()});t.push(...o)};if(a.type==="script")for(let n of a.script)r(n.id);else r(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},l("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};
