import{j as e,r as a}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a71.js";import{R as o}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a716.js";import{B as r,b as f,r as E}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7124.js";import{_ as l}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7111.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a717.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a719.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a718.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7119.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7120.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a714.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a713.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a712.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7110.js";const g=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7172.js")),[]));function b(){return e.jsx(a.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(g,{})})}const j=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7173.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_28_54378c94-eda0-47d4-8f59-c666edac6a7174.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_28_54378c94-eda0-47d4-8f59-c666edac6a7175.js")),[]));function C(){return e.jsx(a.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(y,{})})}const c=document.createElement("section");c.setAttribute("data-id","FilterChat");const m=document.createElement("section");m.setAttribute("data-id","Menu");const p=document.createElement("section");p.setAttribute("data-id","SearchCamp");const u=document.createElement("section");u.setAttribute("data-id","Notification_Inbox");const h=()=>{r.getState().getSeletor("chatFilters",d=>{d.forEach(t=>{t.id==="all-filter"||t.id==="labels-filter"?t.addEventListener("click",()=>{f.getState().setActiveTab({id:1,type:"tab"})}):t.addEventListener("click",()=>{f.getState().setActiveTab({id:0,type:"default-filter"})})})})},S=[{father:()=>r.getState().getSeletor("menu_whats"),children:m,type:"prepend"},{father:()=>r.getState().getSeletor("searchCamp"),children:p,type:"appendChild"},{father:()=>r.getState().getSeletor("trasferidos"),children:c,type:"appendChild"},{father:()=>r.getState().getSeletor("notification"),children:u,type:"insertAdjacentElement"}];function V(){const{active_inbox_notify:d}=E();return a.useEffect(()=>{S.map(({father:t,children:i,type:n})=>{switch(n){case"prepend":t()?.prepend(i);break;case"insert":let s=t();s.innerHTML="",s.prepend(i);break;case"insertAdjacentElement":t()?.insertAdjacentElement("afterend",i);break;case"appendChild":default:t()?.appendChild(i);break}}),r.getState().getSeletor("chatList",t=>{new MutationObserver(n=>{n[0].addedNodes.length!==0&&setTimeout(()=>{const{father:s,children:_}=S[1];s()?.prepend(_)},150)}).observe(t,{childList:!0})}),r.getState().getSeletor("side",t=>{new MutationObserver(n=>{n[0]?.removedNodes[0]?.className===r.getState().getListElement("chatFiltersContainer","div_filters")&&(h(),r.getState().getSeletor("trasferidos")?.appendChild(c))}).observe(t,{childList:!0})}),h()},[]),e.jsxs(e.Fragment,{children:[o.createPortal(e.jsx(x,{}),m),o.createPortal(e.jsx(L,{}),p),o.createPortal(e.jsx(b,{}),c),o.createPortal(d?e.jsx(C,{}):null,u)]})}export{V as default};
