import{j as e}from"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f.js";import{an as h,am as v,n as A,m as b,w as C,b8 as E,b9 as k}from"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f23.js";import{u as w,a as z}from"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f89.js";import{u as M}from"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f20.js";import{A as N}from"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f179.js";import{E as Q}from"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f157.js";import{au as S,aB as O,ap as n,b as L}from"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f11.js";import{a as I}from"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f108.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f8.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f7.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f19.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f4.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f3.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f2.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f10.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f6.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f9.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f34.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f191.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f192.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f5.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f120.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f125.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f153.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f105.js";import"./v_7_4_3_7_e8fda66a-fa64-447c-bcdc-42ba13285e7f46.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}=h(),{edit:p,deleteActions:c,getAction:d}=v(),{setActiveCreateOrEdit:m}=w(),{setQuickReplyAll:l}=z(),{language:i}=M(),{close:o}=A(),{open:a}=b(),u=C(s=>s.activeChat),{setAcao:x}=E(),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(),L({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(Q,{card:t}))},j=[{id:1,name:i.editar,action:()=>y(),icon:e.jsx(S,{size:18})},{id:2,name:i.createAgendamento,action:()=>{o(),a(e.jsx(N,{create:!0,tipo:"agendamento",userId:u.id.user,name:"",resID:t.id}))},icon:e.jsx(O,{size:18})},{id:3,name:i.editAndSend,action:()=>g(),icon:e.jsx(k,{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};
