import{j as e,_ as c,z as f,a9 as h}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b710.js";import{R as v}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b75.js";import{a as s}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b74.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_16_364f475f-21c1-4d89-bf17-70efc8c405b723.js";import{C}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b789.js";import{u as _}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b761.js";import{c as z}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b78.js";import{e as m}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b721.js";import{N as M}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b732.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b718.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b76.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b719.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b77.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b7.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b79.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b72.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b73.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b745.js";const R=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b786.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_16_364f475f-21c1-4d89-bf17-70efc8c405b787.js")).then(t=>t.i),[])),N=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b788.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};

