import{j as e,ao as h,ax as A,ak as n,h as v}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf10.js";import{ao as b,E,p as k,o as C,y as w,b5 as z,b6 as M}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf23.js";import{a as N,b as Q}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf92.js";import{u as S}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf19.js";import{A as O}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf178.js";import{E as L}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf156.js";import{a as I}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf109.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-7f2344477fbf8.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf4.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf5.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf7.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-7f2344477fbf36.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf190.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf191.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf121.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf126.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf152.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf21.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf47.js";const T="flex gap-1 cursor-pointer items-center h-9 py-2 rounded-lg hover:bg-[var(--dropdown-background-hover)] px-2";function de({card:t}){const{deleteQuickReply:r}=b(),{edit:p,deleteActions:d,getAction:c}=E(),{setActiveCreateOrEdit:m}=N(),{setQuickReplyAll:l}=Q(),{language:i}=S(),{close:o}=k(),{open:a}=C(),{activeChat:u}=w(),{setAcao:x}=z(),f=!!document.querySelector('[data-id="eem-old"], [data-id="eem-new"]'),y=()=>{o();let s="respostaRapida";t.type==="script"?s="script":p(t.id),l(t),m({type:"edit",model:s})},R=()=>{o(),v({icon:e.jsx(n,{type:t.type,style:"w-6 h-6 text-[var(--primaria)]"}),confirmText:i.confirm,content:`${i.deleteQuickReplay} ${t.titulo}?`,submit:()=>{d(t.id),r(t.id)}})},g=()=>{o(),x(c(t.id)),a(e.jsx(L,{card:t}))},j=[{id:1,name:i.editar,action:()=>y(),icon:e.jsx(h,{size:18})},{id:2,name:i.createAgendamento,action:()=>{o(),a(e.jsx(O,{create:!0,tipo:"agendamento",userId:u.id.user,name:"",resID:t.id}))},icon:e.jsx(A,{size:18})},{id:3,name:i.editAndSend,action:()=>g(),icon:e.jsx(M,{size:20}),disabled:f},{id:4,name:i.Deletar,action:()=>R(),icon:e.jsx(I,{size:18})}];return e.jsxs("div",{className:"px-2 min-w-60",children:[e.jsxs("div",{className:"flex gap-1 items-center mb-2",children:[e.jsx("div",{children:e.jsx(n,{type:t.type,style:"w-5 h-5 text-[var(--icon)]"})}),e.jsx("div",{className:"truncate max-w-40 font-bold text-lg first-letter:uppercase",children:t.titulo})]}),e.jsx("hr",{}),e.jsx("div",{className:"flex flex-col gap-1 mt-[2px]",children:j.map(s=>!s.disabled&&(t.type!=="script"||t.type==="script"&&s.id!==3)&&e.jsxs("div",{className:T,onClick:s.action,children:[e.jsx("span",{className:"text-[var(--icon)]",children:s.icon}),e.jsx("span",{children:s.name})]},s.id))})]})}export{de as default};
