import{bz as l,bA as v,bB as u,by as r}from"./index.69621fe4.js";const a=l.global.t,{updateStatusMensagem:m}=v();u.on("SendSuccess",c=>{console.log("[boot/XcontactEventManager] [SendSuccess] ",c);const{message:s,atendimento:i,...e}=c;if(console.log("restou",e),s&&s.status&&m(s.id,s.status,s.mailMessageID),s&&s.status&&s.status==="failed"){const n=s.dados_adicionais.split(":"),o=n[0],t=n[1];if(o&&t){console.log(`Mensagem de falha ${t} da api ${o}`);const d=a(`notificacoes.envioWhatsApp.${o}.erros.${parseInt(t)}`);r.create({html:!0,group:!1,timeout:0,message:`<div>
            <div class="q-card__section q-card__section--vert row items-center q-pb-none">
              <div class="text-h6">${a("notificacoes.envioWhatsApp.labels.falha")} ${i.fromID}</div>
            </div>
            <div class="q-card__section q-card__section--vert">
            ${d}
            </div>
        </div>`,color:"red",actions:[{icon:"close",color:"white",round:!0,handler:()=>{}}]})}}e.errorMsg&&r.create({html:!0,group:!1,timeout:0,message:`<div>
          <div class="q-card__section q-card__section--vert row items-center q-pb-none">
            <div class="text-h6">${a("notificacoes.envioWhatsApp.labels.falha")} ${i.fromID}</div>
          </div>
          <div class="q-card__section q-card__section--vert">
          ${e.errorMsg}
          </div>
      </div>`,color:"red",actions:[{icon:"close",color:"white",round:!0,handler:()=>{}}]})});
