import{j as e,_ as c,x as f,a6 as v}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf10.js";import{R as h}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf5.js";import{a as s}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf4.js";import{B as m,q as x,p as g,A as L,y as p,aj as b,z as j}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf23.js";import{C}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf93.js";import{c as _}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf8.js";import{e as u}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf21.js";import{N as z}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf33.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf18.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf6.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf19.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf7.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf9.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf2.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf3.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf47.js";const R=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf90.js")),[]));function y(){return e.jsx(s.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(R,{})})}p.subscribe(a=>{a.activeChat.id.server==="@lid"&&m.getState().setMenuContent("children","respostasRapidas")});function M(){const{menuContent:a,setMenuContent:t}=m(),{label:n}=x(),{open:d}=g(),{isNewModel:o}=L(),{activeChat:i}=p(),l=[{id:"perfilContato",ico:e.jsx(b,{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:r=>d(e.jsx(y,{}),{placement:"bottom"},r.target)},{id:"close",ico:e.jsx(C,{size:20}),name:"Close",renderInLid:!0,funcao:r=>t("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 "+(n.cor_primaria?"fill-[var(--primaria)] text-[var(--primaria)]":"fill-[var(--panel-header-icon)] text-[var(--panel-header-icon)]"),children:l.map(r=>i&&i.id.server==="@lid"&&!r.renderInLid?null:e.jsx("div",{onClick:r.funcao,className:r.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)] "+(a.children===r.id?"bg-[var(--primaria)] text-[var(--letra)]":`bg-[var(--menu-bar-item-background-active)] ${n.cor_primaria?"text-[var(--primaria)]":"text-[var(--panel-header-icon)]"}`),children:r.ico})},r.id))})})}const I=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf91.js")).then(a=>a.i),[])),E=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf92.js")).then(a=>a.i),[]));function J(){var o,i;const{menuContent:a}=m(),t=(i=(o=p().activeChat)==null?void 0:o.id)==null?void 0:i.user,n={perfilContato:e.jsx(I,{}),respostasRapidas:e.jsx(E,{}),anotacoes:e.jsx(z,{userID:t,viwerModel:"res",id:"notes_quick_reply"})};s.useEffect(()=>{j.getState().getSeletor("menuLateral",l=>{l.insertAdjacentElement("afterend",u)})},[]);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:`${a.width}px`},children:[e.jsx(M,{}),e.jsx("div",{className:"bg-[var(--background-default)]",style:{maxHeight:"calc(100vh - 120px)"},children:e.jsx(s.Suspense,{fallback:e.jsx(e.Fragment,{}),children:n[a.children]})})]})});return h.createPortal(d,u)}export{J as default};
