import{j as e,_ as c,z as f,a9 as h}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f10.js";import{R as v}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f5.js";import{a as s}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f4.js";import{K as u,s as x,q as g,A as L,z as p,ao as b,B as j}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f23.js";import{C}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f89.js";import{u as _}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f61.js";import{c as z}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f8.js";import{e as m}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f21.js";import{N as M}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f32.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f18.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f6.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f19.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f7.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f9.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f2.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f3.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f45.js";const R=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f86.js")),[]));function y(){return e.jsx(s.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(R,{})})}function I(){const{menuContent:t,setMenuContent:n}=u(_(a=>({menuContent:a.menuContent,setMenuContent:a.setMenuContent}))),i=x(a=>a.label),{open:d}=g.getState(),o=L(a=>a.isNewModel),r=p(a=>a.activeChat);s.useEffect(()=>{var a;((a=r==null?void 0:r.id)==null?void 0:a.server)==="@lid"&&n("children","respostasRapidas")},[r,n]);const l=[{id:"perfilContato",ico:e.jsx(b,{size:20}),name:"perfilContato",renderInLid:!1,funcao:()=>n("children","perfilContato")},{id:"respostasRapidas",ico:e.jsx(f,{size:20}),name:"RespostaRapida",renderInLid:!0,funcao:()=>n("children","respostasRapidas")},{id:"anotacoes",ico:e.jsx(z,{size:20}),name:"Agendamentos",renderInLid:!1,funcao:()=>n("children","anotacoes")},{id:"config",ico:e.jsx(h,{size:20}),name:"Config",renderInLid:!0,funcao:a=>d(e.jsx(y,{}),{placement:"bottom"},a.target)},{id:"close",ico:e.jsx(C,{size:20}),name:"Close",renderInLid:!0,funcao:a=>n("children","close")}];return e.jsx("div",{className:o?"bg-[var(--background-default)]":"bg-[var(--panel-header-background)]",children:e.jsx("div",{className:"h-[64px] p-2 flex gap-2 items-center "+(i.cor_primaria?"fill-[var(--primaria)] text-[var(--primaria)]":"fill-[var(--panel-header-icon)] text-[var(--panel-header-icon)]"),children:l.map(a=>r&&r.id.server==="@lid"&&!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)] "+(t.children===a.id?"bg-[var(--primaria)] text-[var(--letra)]":`bg-[var(--menu-bar-item-background-active)] ${i.cor_primaria?"text-[var(--primaria)]":"text-[var(--panel-header-icon)]"}`),children:a.ico})},a.id))})})}const E=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f87.js")).then(t=>t.i),[])),N=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f88.js")).then(t=>t.i),[]));function Q(){const{menuContent:t}=u(),n=p(o=>{var r,l;return(l=(r=o.activeChat)==null?void 0:r.id)==null?void 0:l.user}),i={perfilContato:e.jsx(E,{}),respostasRapidas:e.jsx(N,{}),anotacoes:e.jsx(M,{userID:n,viwerModel:"res",id:"notes_quick_reply"})};s.useEffect(()=>{j.getState().getSeletor("menuLateral",o=>{o.insertAdjacentElement("afterend",m)})},[]);const d=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:`${t.width}px`},children:[e.jsx(I,{}),e.jsx("div",{className:"bg-[var(--background-default)]",style:{maxHeight:"calc(100vh - 120px)"},children:e.jsx(s.Suspense,{fallback:e.jsx(e.Fragment,{}),children:i[t.children]})})]})});return v.createPortal(d,m)}export{Q as default};
