import{_ as d,y as f,a7 as h}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7111.js";import{j as e,r as n}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a71.js";import{R as v}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a716.js";import{K as m,s as x,q as g,A as L,z as u,as as C,B as b}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7124.js";import{C as j}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7190.js";import{u as _}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7162.js";import{c as z}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a719.js";import{e as c}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7122.js";import{N as M}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7133.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7119.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a717.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7120.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a718.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";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7146.js";const R=n.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7187.js")),[]));function y(){return e.jsx(n.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(R,{})})}function I(){const{menuContent:r,setMenuContent:t}=m(_(a=>({menuContent:a.menuContent,setMenuContent:a.setMenuContent}))),o=x(a=>a.label),{open:l}=g.getState(),s=L(a=>a.isNewModel),i=u(a=>a.activeChat);n.useEffect(()=>{i?.id?.server==="@lid"&&t("children","respostasRapidas")},[i,t]);const p=[{id:"perfilContato",ico:e.jsx(C,{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(z,{size:20}),name:"Agendamentos",renderInLid:!1,funcao:()=>t("children","anotacoes")},{id:"config",ico:e.jsx(h,{size:20}),name:"Config",renderInLid:!0,funcao:a=>l(e.jsx(y,{}),{placement:"bottom"},a.target)},{id:"close",ico:e.jsx(j,{size:20}),name:"Close",renderInLid:!0,funcao:a=>t("children","close")}];return e.jsx("div",{className:s?"bg-[var(--background-default)]":"bg-[var(--panel-header-background)]",children:e.jsx("div",{className:"h-[64px] p-2 flex gap-2 items-center "+(o.cor_primaria?"fill-[var(--primaria)] text-[var(--primaria)]":"fill-[var(--panel-header-icon)] text-[var(--panel-header-icon)]"),children:p.map(a=>i&&i.id.server==="@lid"&&!i.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.cor_primaria?"text-[var(--primaria)]":"text-[var(--panel-header-icon)]"}`),children:a.ico})},a.id))})})}const E=n.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7188.js")).then(r=>r.i),[])),N=n.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7189.js")).then(r=>r.i),[]));function Q(){const{menuContent:r}=m(),t=u(s=>s.activeChat?.id?.user),o={perfilContato:e.jsx(E,{}),respostasRapidas:e.jsx(N,{}),anotacoes:e.jsx(M,{userID:t,viwerModel:"res",id:"notes_quick_reply"})};n.useEffect(()=>{b.getState().getSeletor("menuLateral",s=>{s.insertAdjacentElement("afterend",c)})},[]);const l=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(I,{}),e.jsx("div",{className:"bg-[var(--background-default)]",style:{maxHeight:"calc(100vh - 120px)"},children:e.jsx(n.Suspense,{fallback:e.jsx(e.Fragment,{}),children:o[r.children]})})]})});return v.createPortal(l,c)}export{Q as default};
