import{j as e,au as j,aD as v,ap as n,h as A}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f10.js";import{at as C,N as b,q as E,p as k,z,b7 as N,b8 as w}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f23.js";import{u as M,a as Q}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f88.js";import{u as S}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f19.js";import{A as O}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f178.js";import{E as L}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f156.js";import{a as D}from"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f106.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f18.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f6.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f4.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f8.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f5.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f7.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f9.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f2.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f3.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f35.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f188.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f189.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f118.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f123.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f152.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f21.js";import"./v_7_4_2_18_ea7d0884-20ea-4e04-b6f3-cef449ac182f45.js";const I="flex gap-1 cursor-pointer items-center h-9 py-2 rounded-lg hover:bg-[var(--dropdown-background-hover)] px-2";function ce({card:t}){const{deleteQuickReply:r}=C(),{edit:p,deleteActions:c,getAction:d}=b(),{setActiveCreateOrEdit:m}=M(),{setQuickReplyAll:l}=Q(),{language:i}=S(),{close:o}=E(),{open:a}=k(),u=z(s=>s.activeChat),{setAcao:x}=N(),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(),A({icon:e.jsx(n,{type:t.type,style:"w-6 h-6 text-[var(--primaria)]"}),confirmText:i.confirm,content:`${i.deleteQuickReplay} ${t.titulo}?`,submit:()=>{c(t.id),r(t.id)}})},g=()=>{o(),x(d(t.id)),a(e.jsx(L,{card:t}))},h=[{id:1,name:i.editar,action:()=>y(),icon:e.jsx(j,{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(v,{size:18})},{id:3,name:i.editAndSend,action:()=>g(),icon:e.jsx(w,{size:20}),disabled:f},{id:4,name:i.Deletar,action:()=>R(),icon:e.jsx(D,{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:h.map(s=>!s.disabled&&(t.type!=="script"||t.type==="script"&&s.id!==3)&&e.jsxs("div",{className:I,onClick:s.action,children:[e.jsx("span",{className:"text-[var(--icon)]",children:s.icon}),e.jsx("span",{children:s.name})]},s.id))})]})}export{ce as default};
