import{j as e,au as j,aD as v,ap as n,h as A}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d610.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_23_80f0be4c-2624-48ff-84de-a733d033e3d623.js";import{u as M,a as Q}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d688.js";import{u as S}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d619.js";import{A as O}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6178.js";import{E as L}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6156.js";import{a as D}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6106.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d618.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d66.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d64.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d68.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d65.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d67.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d69.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d62.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d63.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d635.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6188.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6189.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6118.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6123.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6152.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d621.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d645.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};
