import{j as e,_ as m}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b710.js";import{R as l}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b75.js";import{a}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b74.js";import{B as r,b as _,r as b}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b723.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-70efc8c405b78.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b7.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b719.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";const j=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b771.js")),[]));function x(){return e.jsx(a.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(j,{})})}const v=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b772.js")),[]));function L(){return e.jsx(a.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(v,{})})}const y=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b773.js")),[]));function C(){return e.jsx(a.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(y,{})})}const A=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b774.js")),[]));function F(){return e.jsx(a.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(A,{})})}const d=document.createElement("section");d.setAttribute("data-id","FilterChat");const u=document.createElement("section");u.setAttribute("data-id","Menu");const f=document.createElement("section");f.setAttribute("data-id","SearchCamp");const h=document.createElement("section");h.setAttribute("data-id","Notification_Inbox");const E=()=>{r.getState().getSeletor("chatFilters",p=>{p.forEach(t=>{t.id==="all-filter"||t.id==="labels-filter"?t.addEventListener("click",()=>{_.getState().setActiveTab({id:1,type:"tab"})}):t.addEventListener("click",()=>{_.getState().setActiveTab({id:0,type:"default-filter"})})})})},g=[{father:()=>r.getState().getSeletor("menu_whats"),children:u,type:"prepend"},{father:()=>r.getState().getSeletor("searchCamp"),children:f,type:"appendChild"},{father:()=>r.getState().getSeletor("trasferidos"),children:d,type:"appendChild"},{father:()=>r.getState().getSeletor("notification"),children:h,type:"insertAdjacentElement"}];function H(){const{active_inbox_notify:p}=b();return a.useEffect(()=>{g.map(({father:t,children:o,type:c})=>{var n,s,i;switch(c){case"prepend":(n=t())==null||n.prepend(o);break;case"insert":let S=t();S.innerHTML="",S.prepend(o);break;case"insertAdjacentElement":(s=t())==null||s.insertAdjacentElement("afterend",o);break;case"appendChild":default:(i=t())==null||i.appendChild(o);break}}),r.getState().getSeletor("chatList",t=>{new MutationObserver(c=>{c[0].addedNodes.length!==0&&setTimeout(()=>{var i;const{father:n,children:s}=g[1];(i=n())==null||i.prepend(s)},150)}).observe(t,{childList:!0})}),r.getState().getSeletor("side",t=>{new MutationObserver(c=>{var n,s,i;((s=(n=c[0])==null?void 0:n.removedNodes[0])==null?void 0:s.className)===r.getState().getListElement("chatFiltersContainer","div_filters")&&(E(),(i=r.getState().getSeletor("trasferidos"))==null||i.appendChild(d))}).observe(t,{childList:!0})}),E()},[]),e.jsxs(e.Fragment,{children:[l.createPortal(e.jsx(L,{}),u),l.createPortal(e.jsx(C,{}),f),l.createPortal(e.jsx(x,{}),d),l.createPortal(p?e.jsx(F,{}):null,h)]})}export{H as default};

