import{j as e,_ as m}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d610.js";import{R as l}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d65.js";import{a}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d64.js";import{B as r,b as _,r as b}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d623.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d618.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d66.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d68.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d619.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d67.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d69.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d62.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d63.js";const j=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d671.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_23_80f0be4c-2624-48ff-84de-a733d033e3d672.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_23_80f0be4c-2624-48ff-84de-a733d033e3d673.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_23_80f0be4c-2624-48ff-84de-a733d033e3d674.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};
