import{j as e}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc.js";import{ax as j,O as A,q as v,p as C,z as b,bf as E,bg as k}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc24.js";import{u as z,a as w}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc89.js";import{u as M}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc20.js";import{A as N}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc180.js";import{E as O}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc158.js";import{ar as Q,aA as S,am as n,h as L}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc11.js";import{a as I}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc107.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc7.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc9.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc6.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc8.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc19.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc4.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc3.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc2.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc10.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc36.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc192.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc193.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc5.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc119.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc124.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc154.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc22.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc46.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}=j(),{edit:p,deleteActions:c,getAction:d}=A(),{setActiveCreateOrEdit:m}=z(),{setQuickReplyAll:l}=w(),{language:i}=M(),{close:o}=v(),{open:a}=C(),u=b(s=>s.activeChat),{setAcao:x}=E(),f=!!document.querySelector('[data-id="eem-old"], [data-id="eem-new"]'),g=()=>{o();let s="respostaRapida";t.type==="script"?s="script":p(t.id),l(t),m({type:"edit",model:s})},y=()=>{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)}})},R=()=>{o(),x(d(t.id)),a(e.jsx(O,{card:t}))},h=[{id:1,name:i.editar,action:()=>g(),icon:e.jsx(Q,{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(S,{size:18})},{id:3,name:i.editAndSend,action:()=>R(),icon:e.jsx(k,{size:20}),disabled:f},{id:4,name:i.Deletar,action:()=>y(),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:h.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};
