import{j as e,aj as h,ao as v,ac as n,b as A}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e10.js";import{X as E,y as b,o as C,n as k,z,aD as M,aE as N}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e22.js";import{a as Q,b as w}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e92.js";import{u as O}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e19.js";import{u as S}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e21.js";import{A as L}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e200.js";import{E as D}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e133.js";import{a as I}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e107.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e18.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e8.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e4.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e5.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e7.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e6.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e2.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e3.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e9.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e34.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e46.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e178.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e179.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e117.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e75.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 ce({card:s}){const{deleteQuickReply:r}=E(),{edit:p,deleteActions:c,getAction:d}=b(),{setActiveCreateOrEdit:m}=Q(),{setQuickReplyAll:l}=w(),{language:i}=O(),{close:o}=C(),{open:a}=k(),{activeChat:u}=z(),{setAcao:x}=M(),{open:f}=S(),j=()=>{o();let t="respostaRapida";s.type==="script"?t="script":p(s.id),l(s),m({type:"edit",model:t})},y=()=>{o(),A({icon:e.jsx(n,{type:s.type,style:"w-6 h-6 text-[var(--primaria)]"}),confirmText:i.confirm,content:`${i.deleteQuickReplay} ${s.titulo}?`,submit:()=>{c(s.id),r(s.id)}})},R=()=>{o(),x(d(s.id)),a(e.jsx(D,{card:s}))},g=[{id:1,name:i.editar,action:()=>j(),icon:e.jsx(h,{size:18})},{id:2,name:i.createAgendamento,action:()=>{o(),a(e.jsx(L,{create:!0,tipo:"agendamento",userId:u.id.user,name:"",resID:s.id}))},icon:e.jsx(v,{size:18})},{id:3,name:i.editAndSend,action:()=>R(),icon:e.jsx(N,{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:s.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:s.titulo})]}),e.jsx("hr",{}),e.jsx("div",{className:"flex flex-col gap-1 mt-[2px]",children:g.map(t=>!t.disabled&&(s.type!=="script"||s.type==="script"&&t.id!==3)&&e.jsxs("div",{className:T,onClick:t.action,children:[e.jsx("span",{className:"text-[var(--icon)]",children:t.icon}),e.jsx("span",{children:t.name})]},t.id))})]})}export{ce as default};
