import{j as e,_ as m}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf10.js";import{R as l}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf5.js";import{a}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf4.js";import{z as r,b as _,r as b}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf23.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf18.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf6.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf8.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf19.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf7.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf9.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf2.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf3.js";const j=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf75.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_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf76.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_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf77.js")),[]));function C(){return e.jsx(a.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(y,{})})}const z=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf78.js")),[]));function A(){return e.jsx(a.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(z,{})})}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 U(){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(A,{}):null,h)]})}export{U as default};
