import{j as e,_ as m}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b10.js";import{R as l}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b5.js";import{a}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b4.js";import{x as r,a as _,r as b}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b23.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b18.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b8.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b19.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b7.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b6.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b9.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b2.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b3.js";const x=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b80.js")),[]));function j(){return e.jsx(a.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(x,{})})}const v=a.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b81.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_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b82.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_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b83.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 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(j,{}),d),l.createPortal(p?e.jsx(F,{}):null,h)]})}export{U as default};
