"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const query_1=require("@b/utils/query");exports.metadata={summary:"Deletes a support ticket",operationId:"deleteSupportTicket",tags:["Admin","CRM","Support Ticket"],parameters:(0,query_1.deleteRecordParams)("support ticket"),responses:(0,query_1.deleteRecordResponses)("Support Ticket"),permission:"delete.support.ticket",requiresAuth:!0,logModule:"ADMIN_SUP",logTitle:"Delete ticket"};exports.default=async e=>{const{params:t,query:s,ctx:r}=e,{id:u}=t;null==r||r.step("Deleting ticket");await(0,query_1.handleSingleDelete)({model:"supportTicket",id:u,query:s});null==r||r.success("Ticket deleted successfully");return{message:"Ticket restored successfully"}};