import{_ as d,j as f,K as v}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d67.js";import{j as e}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d65.js";import{R as h}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d68.js";import{r as i}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d6.js";import{F as m,n as x,v as p,w as g}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d623.js";import{e as L}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d64.js";import{c as j}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d635.js";import{C}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d691.js";import{u as l}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d647.js";import{h as _}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d66.js";import{e as c}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d622.js";import{N as b}from"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d630.js";import"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d63.js";import"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d62.js";import"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d69.js";import"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d610.js";import"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d620.js";import"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d646.js";import"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d648.js";import"./v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d611.js";const z=i.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d688.js")),[]));function R(){return e.jsx(i.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(z,{})})}function M(){const{menuContent:r,setMenuContent:t}=m(l(a=>({menuContent:a.menuContent,setMenuContent:a.setMenuContent}))),{open:s}=x.getState(),n=p(a=>a.activeChat),{icons_cor_primaria:o}=L(l(a=>({icons_cor_primaria:a.icons_cor_primaria})));i.useEffect(()=>{n?.id?.server==="@lid"&&t("children","respostasRapidas")},[n,t]);const u=[{id:"perfilContato",ico:e.jsx(j,{size:20}),name:"perfilContato",renderInLid:!1,funcao:()=>t("children","perfilContato")},{id:"respostasRapidas",ico:e.jsx(f,{size:20}),name:"RespostaRapida",renderInLid:!0,funcao:()=>t("children","respostasRapidas")},{id:"anotacoes",ico:e.jsx(_,{size:20}),name:"Agendamentos",renderInLid:!1,funcao:()=>t("children","anotacoes")},{id:"config",ico:e.jsx(v,{size:20}),name:"Config",renderInLid:!0,funcao:a=>s(e.jsx(R,{}),{placement:"bottom"},a.target)},{id:"close",ico:e.jsx(C,{size:20}),name:"Close",renderInLid:!0,funcao:a=>t("children","close")}];return e.jsx("div",{className:"bg-[var(--background-default)]",children:e.jsx("div",{className:"h-[64px] p-2 flex gap-2 items-center "+(o?"fill-[var(--primaria)] text-[var(--primaria)]":"fill-[var(--panel-header-icon)] text-[var(--panel-header-icon)]"),children:u.map(a=>n&&n.id.server==="@lid"&&!n.accountLid&&!a.renderInLid?null:e.jsx("div",{onClick:a.funcao,className:a.id==="close"?"ml-auto":"",children:e.jsx("div",{className:"menu-item pulse cursor-pointer rounded-[10px] p-2 hover:!bg-[var(--primaria)] hover:!text-[var(--letra)] "+(r.children===a.id?"bg-[var(--primaria)] text-[var(--letra)]":`bg-[var(--menu-bar-item-background-active)] ${o?"text-[var(--primaria)]":"text-[var(--panel-header-icon)]"}`),children:a.ico})},a.id))})})}const y=i.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d689.js")).then(r=>r.i),[])),E=i.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_3_26_c99b3fd5-4d99-426a-8862-d508d2f3e0d690.js")).then(r=>r.i),[]));function Q(){const{menuContent:r}=m(),t=p(o=>o.activeChat?.id?.user),s={perfilContato:e.jsx(y,{}),respostasRapidas:e.jsx(E,{}),anotacoes:e.jsx(b,{userID:t,viwerModel:"res",id:"notes_quick_reply"})};i.useEffect(()=>{g.getState().getSeletor("menuLateral",o=>{o.insertAdjacentElement("afterend",c)})},[]);const n=e.jsx("div",{className:"relative z-[100] h-full bg-[var(--background-default)] border-[var(--conversation-header-border)] border-solid shadow-sm border-l",children:e.jsxs("div",{style:{width:`${r.width}px`},children:[e.jsx(M,{}),e.jsx("div",{className:"bg-[var(--background-default)]",style:{maxHeight:"calc(100vh - 120px)"},children:e.jsx(i.Suspense,{fallback:e.jsx(e.Fragment,{}),children:s[r.children]})})]})});return h.createPortal(n,c)}export{Q as default};
