import{j as e,_ as c,D as f,aa as h}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d610.js";import{R as v}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d65.js";import{a as s}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d64.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_23_80f0be4c-2624-48ff-84de-a733d033e3d623.js";import{C}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d689.js";import{u as _}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d661.js";import{c as z}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d68.js";import{e as m}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d621.js";import{N as M}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d632.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d618.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d66.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d619.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d67.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d69.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d62.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d63.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d645.js";const R=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d686.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"&&!r.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)] "+(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_23_80f0be4c-2624-48ff-84de-a733d033e3d687.js")).then(t=>t.i),[])),N=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d688.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};
