import{j as e,_ as c,y as f,a7 as v}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab710.js";import{R as h}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab75.js";import{a as s}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab74.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_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab723.js";import{C}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab791.js";import{c as _}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab78.js";import{e as u}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab721.js";import{N as z}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab733.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab718.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab76.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab719.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab77.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab7.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab79.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab72.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab73.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab747.js";const y=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab788.js")),[]));function R(){return e.jsx(s.Suspense,{fallback:e.jsx(e.Fragment,{}),children:e.jsx(y,{})})}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(R,{}),{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_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab789.js")).then(a=>a.i),[])),E=s.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab790.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};
