import{j as e}from"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b.js";import{af as v,ae as h,n as A,m as C,v as E,aT as b}from"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b23.js";import{u as k,a as w}from"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b90.js";import{u as z}from"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b20.js";import{A as M}from"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b179.js";import{E as N}from"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b158.js";import{aA as Q,aH as S,av as n,b as O}from"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b11.js";import{a as L}from"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b110.js";import{o as T}from"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b35.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b8.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b7.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b19.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b4.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b3.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b2.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b10.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b6.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b34.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b191.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b192.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b5.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b122.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b126.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b154.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b9.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b106.js";import"./v_7_4_3_17_17ffe662-3f12-45a2-ae5d-997b41d0d61b47.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 me({card:t}){const{deleteQuickReply:r}=v(),{edit:p,deleteActions:c,getAction:d}=h(),{setActiveCreateOrEdit:m}=k(),{setQuickReplyAll:l}=w(),{language:i}=z(),{close:o}=A(),{open:a}=C(),u=E(s=>s.activeChat),{setAcao:x}=b(),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(),O({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(N,{card:t}))},j=[{id:1,name:i.editar,action:()=>y(),icon:e.jsx(Q,{size:18})},{id:2,name:i.createAgendamento,action:()=>{o(),a(e.jsx(M,{create:!0,tipo:"agendamento",userId:u.id.user,name:"",resID:t.id}))},icon:e.jsx(S,{size:18})},{id:3,name:i.editAndSend,action:()=>g(),icon:e.jsx(T,{size:20}),disabled:f},{id:4,name:i.Deletar,action:()=>R(),icon:e.jsx(L,{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:I,onClick:s.action,children:[e.jsx("span",{className:"text-[var(--icon)]",children:s.icon}),e.jsx("span",{children:s.name})]},s.id))})]})}export{me as default};
