import{r as o,j as e}from"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a2777.js";import{y as v,m as w,af as N}from"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a277723.js";import{a as D}from"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a277730.js";import{V as A,X as i,Y as b,$ as l}from"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a277711.js";import{u as y}from"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a277720.js";import{W as m}from"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a277719.js";import{U as k}from"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a277762.js";import{G as C}from"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a277763.js";import"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a27778.js";import"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a27777.js";import"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a27774.js";import"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a27773.js";import"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a27772.js";import"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a277710.js";import"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a27776.js";import"./v_7_4_3_5_5680d44b-ceb1-449a-bec3-8cbef70a27779.js";function X(){const{multi_atendente:d}=v(),{close:x,modal:h}=w(),{createNoteSocket:p}=D(),{activeTrasferencia:t}=N(),{language:s}=y(),n=d.find(g=>g.id===t.remetenteID),[a,u]=o.useState();o.useEffect(()=>{(async()=>u(await m.Utils("get-card",t.chatID)))()},[h]);const[r,f]=o.useState(!0),c=()=>{x(),t.text.length>0&&r&&p(t.chatID,`*_${s.atendimentoEncaminhadoDe} ${n?.assinatura}:_* 
 ${t.text}`,"")},j=e.jsx("span",{children:t.chatID.length>17?e.jsx(C,{style:"w-14 h-14"}):e.jsx(k,{style:"w-14 h-14"})});return e.jsxs("div",{className:"flex flex-col gap-4 w-[500px]",children:[e.jsxs(A,{children:[s.atendimentoEnviadopor," ",n?.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:s.atendimentoComUrgencia})]}),a&&e.jsxs("div",{className:"flex gap-2 items-center",children:[a.picture?e.jsx("div",{className:"w-14",children:e.jsx("img",{src:a.picture,className:"rounded-full"})}):j,e.jsx(i,{weight:"600",children:a.name})]}),t&&t.text&&t.text.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsxs(i,{weight:"500",children:[s.mensagemDe," ",n?.assinatura,":"]}),e.jsx(i,{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:s.salvarMensagemNaNotaDoContato}),e.jsx(b,{estado:r,switchUpdate:()=>f(!r),id:"save_notes"})]})})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:e.jsx(l,{name:s.AdicionarAFila,funcao:c})}),e.jsx("span",{children:e.jsx(l,{name:s.responderAgora,funcao:()=>{c(),m.Chat("openChatBottom",t.chatID)}})})]})]})}export{X as default};
