import{j as e,_ as m}from"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec510.js";import{R as l}from"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec55.js";import{a}from"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec54.js";import{z as r,b as _,r as b}from"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec523.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec518.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec56.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec58.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec5.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec519.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec57.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec59.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec52.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec53.js";const j=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec573.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_12_5cc5c70e-17b9-46d5-a61c-750829962ec574.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_12_5cc5c70e-17b9-46d5-a61c-750829962ec575.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_12_5cc5c70e-17b9-46d5-a61c-750829962ec576.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};
