import{j as e,V as v,$ as o,a0 as w,a2 as l}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab710.js";import{a as i}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab74.js";import{ag as N,o as D,ah as A}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab723.js";import{a as b}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab733.js";import{u as k}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab719.js";import{W as m}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab718.js";import{U as y}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab764.js";import{G as C}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab765.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab78.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab7.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab75.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab77.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab76.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";function q(){const{multi_atendente:d}=N(),{close:x,modal:h}=D(),{createNoteSocket:p}=b(),{activeTrasferencia:t}=A(),{language:a}=k(),s=d.find(g=>g.id===t.remetenteID),[n,u]=i.useState();i.useEffect(()=>{(async()=>u(await m.Utils("get-card",t.chatID)))()},[h]);const[r,f]=i.useState(!0),c=()=>{x(),t.text.length>0&&r&&p(t.chatID,`*_${a.atendimentoEncaminhadoDe} ${s==null?void 0:s.assinatura}:_* 
 ${t.text}`,"")},j=e.jsx("span",{children:t.chatID.length>17?e.jsx(C,{style:"w-14 h-14"}):e.jsx(y,{style:"w-14 h-14"})});return e.jsxs("div",{className:"flex flex-col gap-4 w-[500px]",children:[e.jsxs(v,{children:[a.atendimentoEnviadopor," ",s==null?void 0:s.assinatura]}),t.urgencia&&e.jsxs("div",{role:"alert",className:"alert alert-warning text-[var(--letra)]",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 shrink-0 stroke-current",fill:"none",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),e.jsx("span",{className:"text-[var(--letra)]",children:a.atendimentoComUrgencia})]}),n&&e.jsxs("div",{className:"flex gap-2 items-center",children:[n.picture?e.jsx("div",{className:"w-14",children:e.jsx("img",{src:n.picture,className:"rounded-full"})}):j,e.jsx(o,{weight:"600",children:n.name})]}),t&&t.text&&t.text.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsxs(o,{weight:"500",children:[a.mensagemDe," ",s==null?void 0:s.assinatura,":"]}),e.jsx(o,{children:t.text})]}),e.jsx("label",{htmlFor:"save_notes",children:e.jsxs("div",{className:"flex justify-between cursor-pointer items-center h-9 px-1 py-2",children:[e.jsx("span",{children:a.salvarMensagemNaNotaDoContato}),e.jsx(w,{estado:r,switchUpdate:()=>f(!r),id:"save_notes"})]})})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:e.jsx(l,{name:a.AdicionarAFila,funcao:c})}),e.jsx("span",{children:e.jsx(l,{name:a.responderAgora,funcao:()=>{c(),m.Chat("openChatBottom",t.chatID)}})})]})]})}export{q as default};
